[SSE] Send formula lang info to sdk

This commit is contained in:
Julia Radzhabova
2024-04-08 19:48:06 +03:00
parent f4a65b399c
commit c19aa6d1d9
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}
});

View File

@ -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);
};