mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 01:53:55 +08:00
[SSE] Send formula lang info to sdk
This commit is contained in:
@ -189,17 +189,17 @@ define([
|
||||
var me = this;
|
||||
Common.Utils.InternalSettings.set("sse-settings-func-locale", lang);
|
||||
if (me.langJson[lang]) {
|
||||
me.api.asc_setLocalization(me.langJson[lang]);
|
||||
me.api.asc_setLocalization(me.langJson[lang], lang);
|
||||
Common.NotificationCenter.trigger('formula:settings', this);
|
||||
} else if (lang == 'en') {
|
||||
me.api.asc_setLocalization(undefined);
|
||||
me.api.asc_setLocalization(undefined, lang);
|
||||
Common.NotificationCenter.trigger('formula:settings', this);
|
||||
} else {
|
||||
Common.Utils.loadConfig('resources/formula-lang/' + lang + '.json',
|
||||
function (config) {
|
||||
if ( config != 'error' ) {
|
||||
me.langJson[lang] = config;
|
||||
me.api.asc_setLocalization(config);
|
||||
me.api.asc_setLocalization(config, lang);
|
||||
Common.NotificationCenter.trigger('formula:settings', this);
|
||||
}
|
||||
});
|
||||
|
||||
@ -29,7 +29,7 @@ class _FunctionGroups extends Component {
|
||||
const editorLang = LocalStorage.getItem('sse-settings-func-lang');
|
||||
this._editorLang = (editorLang ? editorLang : 'en').split(/[\-\_]/)[0].toLowerCase();
|
||||
const localizationFunctions = (data) => {
|
||||
this.api.asc_setLocalization(data);
|
||||
this.api.asc_setLocalization(data, this._editorLang);
|
||||
this.fill(data);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user