Merge pull request #225 from ONLYOFFICE/feature/Bug_41549
Feature/bug 41549
This commit is contained in:
commit
bb55c1ea9f
|
@ -65,6 +65,7 @@
|
||||||
saveAsUrl: 'folder for saving files'
|
saveAsUrl: 'folder for saving files'
|
||||||
licenseUrl: <url for license>,
|
licenseUrl: <url for license>,
|
||||||
customerId: <customer id>,
|
customerId: <customer id>,
|
||||||
|
region: <regional settings> // can be 'en-us' or lang code
|
||||||
|
|
||||||
user: {
|
user: {
|
||||||
id: 'user id',
|
id: 'user id',
|
||||||
|
|
|
@ -318,6 +318,7 @@ define([
|
||||||
this.appOptions.createUrl = this.editorConfig.createUrl;
|
this.appOptions.createUrl = this.editorConfig.createUrl;
|
||||||
this.appOptions.lang = this.editorConfig.lang;
|
this.appOptions.lang = this.editorConfig.lang;
|
||||||
this.appOptions.location = (typeof (this.editorConfig.location) == 'string') ? this.editorConfig.location.toLowerCase() : '';
|
this.appOptions.location = (typeof (this.editorConfig.location) == 'string') ? this.editorConfig.location.toLowerCase() : '';
|
||||||
|
this.appOptions.region = (typeof (this.editorConfig.region) == 'string') ? this.editorConfig.region.toLowerCase() : this.editorConfig.region;
|
||||||
this.appOptions.canAutosave = false;
|
this.appOptions.canAutosave = false;
|
||||||
this.appOptions.canAnalytics = false;
|
this.appOptions.canAnalytics = false;
|
||||||
this.appOptions.sharingSettingsUrl = this.editorConfig.sharingSettingsUrl;
|
this.appOptions.sharingSettingsUrl = this.editorConfig.sharingSettingsUrl;
|
||||||
|
@ -343,7 +344,13 @@ define([
|
||||||
if (value!==null)
|
if (value!==null)
|
||||||
this.api.asc_setLocale(parseInt(value));
|
this.api.asc_setLocale(parseInt(value));
|
||||||
else {
|
else {
|
||||||
this.api.asc_setLocale((this.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.editorConfig.lang)) : 0x0409);
|
value = this.appOptions.region;
|
||||||
|
value = Common.util.LanguageInfo.getLanguages().hasOwnProperty(value) ? value : Common.util.LanguageInfo.getLocalLanguageCode(value);
|
||||||
|
if (value!==null)
|
||||||
|
value = parseInt(value);
|
||||||
|
else
|
||||||
|
value = (this.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.editorConfig.lang)) : 0x0409;
|
||||||
|
this.api.asc_setLocale(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
value = Common.localStorage.getBool("sse-settings-r1c1");
|
value = Common.localStorage.getBool("sse-settings-r1c1");
|
||||||
|
|
|
@ -211,6 +211,7 @@ define([
|
||||||
me.appOptions.createUrl = me.editorConfig.createUrl;
|
me.appOptions.createUrl = me.editorConfig.createUrl;
|
||||||
me.appOptions.lang = me.editorConfig.lang;
|
me.appOptions.lang = me.editorConfig.lang;
|
||||||
me.appOptions.location = (typeof (me.editorConfig.location) == 'string') ? me.editorConfig.location.toLowerCase() : '';
|
me.appOptions.location = (typeof (me.editorConfig.location) == 'string') ? me.editorConfig.location.toLowerCase() : '';
|
||||||
|
me.appOptions.region = (typeof (me.editorConfig.region) == 'string') ? this.editorConfig.region.toLowerCase() : this.editorConfig.region;
|
||||||
me.appOptions.sharingSettingsUrl = me.editorConfig.sharingSettingsUrl;
|
me.appOptions.sharingSettingsUrl = me.editorConfig.sharingSettingsUrl;
|
||||||
me.appOptions.fileChoiceUrl = me.editorConfig.fileChoiceUrl;
|
me.appOptions.fileChoiceUrl = me.editorConfig.fileChoiceUrl;
|
||||||
me.appOptions.mergeFolderUrl = me.editorConfig.mergeFolderUrl;
|
me.appOptions.mergeFolderUrl = me.editorConfig.mergeFolderUrl;
|
||||||
|
@ -226,7 +227,13 @@ define([
|
||||||
if (value!==null)
|
if (value!==null)
|
||||||
this.api.asc_setLocale(parseInt(value));
|
this.api.asc_setLocale(parseInt(value));
|
||||||
else {
|
else {
|
||||||
this.api.asc_setLocale((this.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.editorConfig.lang)) : 0x0409);
|
value = me.appOptions.region;
|
||||||
|
value = Common.util.LanguageInfo.getLanguages().hasOwnProperty(value) ? value : Common.util.LanguageInfo.getLocalLanguageCode(value);
|
||||||
|
if (value!==null)
|
||||||
|
value = parseInt(value);
|
||||||
|
else
|
||||||
|
value = (this.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(me.editorConfig.lang)) : 0x0409;
|
||||||
|
this.api.asc_setLocale(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.appOptions.location == 'us' || me.appOptions.location == 'ca')
|
if (me.appOptions.location == 'us' || me.appOptions.location == 'ca')
|
||||||
|
|
Loading…
Reference in a new issue