File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -506,9 +506,7 @@ export class Menu {
506506 this . a11yVar < boolean > ( 'subtitles' ) ,
507507 this . a11yVar < boolean > ( 'viewBraille' ) ,
508508 this . a11yVar < boolean > ( 'voicing' ) ,
509- this . a11yVar < string > ( 'locale' , value => {
510- MathJax . _ . a11y . sre . Sre . setupEngine ( { locale : value as string } ) ;
511- } ) ,
509+ this . a11yVar < string > ( 'locale' , locale => this . setLocale ( locale ) ) ,
512510 this . a11yVar < string > ( 'speechRules' , value => {
513511 const [ domain , style ] = value . split ( '-' ) ;
514512 this . document . options . sre . domain = domain ;
@@ -982,6 +980,14 @@ export class Menu {
982980 this . rerender ( STATE . COMPILED ) ;
983981 }
984982
983+ /**
984+ * @param {string } locale The speech locale
985+ */
986+ protected setLocale ( locale : string ) {
987+ this . document . options . sre . locale = locale ;
988+ this . rerender ( STATE . COMPILED ) ;
989+ }
990+
985991 /**
986992 * @param {boolean } enrich True to enable enriched math, false to not
987993 */
You can’t perform that action at this time.
0 commit comments