From b712c6a0ade8b8fccfc7c32b20bdc6b5a695b255 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 13 Jan 2022 18:42:31 +0300 Subject: [PATCH] [SSE] Bug 54851 --- apps/spreadsheeteditor/embed/index.html | 1 + apps/spreadsheeteditor/embed/index_loader.html | 1 + apps/spreadsheeteditor/embed/js/ApplicationController.js | 7 +++++++ build/spreadsheeteditor.json | 1 + 4 files changed, 10 insertions(+) diff --git a/apps/spreadsheeteditor/embed/index.html b/apps/spreadsheeteditor/embed/index.html index 94cf225af..4ae0f8326 100644 --- a/apps/spreadsheeteditor/embed/index.html +++ b/apps/spreadsheeteditor/embed/index.html @@ -276,6 +276,7 @@ + diff --git a/apps/spreadsheeteditor/embed/index_loader.html b/apps/spreadsheeteditor/embed/index_loader.html index 18b700b25..9aa8b85ad 100644 --- a/apps/spreadsheeteditor/embed/index_loader.html +++ b/apps/spreadsheeteditor/embed/index_loader.html @@ -343,6 +343,7 @@ + diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 5e0d7bcf4..ca6f42650 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -88,6 +88,13 @@ SSE.ApplicationController = new(function(){ config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback && (config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose); + var reg = (typeof (config.region) == 'string') ? config.region.toLowerCase() : config.region; + reg = Common.util.LanguageInfo.getLanguages().hasOwnProperty(reg) ? reg : Common.util.LanguageInfo.getLocalLanguageCode(reg); + if (reg!==null) + reg = parseInt(reg); + else + reg = (config.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(config.lang)) : 0x0409; + api.asc_setLocale(reg); } function loadDocument(data) { diff --git a/build/spreadsheeteditor.json b/build/spreadsheeteditor.json index c0b8bddb8..06fb6d5f0 100644 --- a/build/spreadsheeteditor.json +++ b/build/spreadsheeteditor.json @@ -346,6 +346,7 @@ "../apps/common/locale.js", "../apps/common/Gateway.js", "../apps/common/Analytics.js", + "../apps/common/main/lib/util/LanguageInfo.js", "../apps/common/embed/lib/util/LocalStorage.js", "../apps/common/embed/lib/util/utils.js", "../apps/common/embed/lib/view/LoadMask.js",