MDL-84970 editor_tiny: Use the langpack name for Moodle language

This commit is contained in:
Andrew Nicols
2025-04-02 16:05:12 +08:00
parent b00c328d2d
commit e5908b0bec
3 changed files with 4 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -29,6 +29,7 @@ import * as Options from './options';
import {addToolbarButton, addToolbarButtons, addToolbarSection,
removeToolbarButton, removeSubmenuItem, updateEditorState} from './utils';
import {addMathMLSupport, addSVGSupport} from './content';
import Config from 'core/config';
/**
* Storage for the TinyMCE instances on the page.
@@ -155,7 +156,7 @@ export const setupForElementId = ({elementId, options}) => {
const initialisePage = async() => {
const lang = document.querySelector('html').lang;
const [tinyMCE, langData] = await Promise.all([getTinyMCE(), fetchLanguage(lang)]);
const [tinyMCE, langData] = await Promise.all([getTinyMCE(), fetchLanguage(Config.language)]);
tinyMCE.addI18n(lang, langData);
};
initialisePage();