diff options
Diffstat (limited to 'web/locale.js')
-rw-r--r-- | web/locale.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/web/locale.js b/web/locale.js index ff07bf166..a5acb0ad3 100644 --- a/web/locale.js +++ b/web/locale.js @@ -21,10 +21,11 @@ Ext.Loader.setConfig({ }); Locale.languages = { + 'ar': { name: 'العربية', code: 'en' }, 'bg': { name: 'Български', code: 'bg' }, 'cs': { name: 'Čeština', code: 'cs' }, 'de': { name: 'Deutsch', code: 'de' }, - 'dk': { name: 'Dansk', code: 'dk' }, + 'da': { name: 'Dansk', code: 'da' }, 'el': { name: 'Ελληνικά', code: 'el' }, 'en': { name: 'English', code: 'en' }, 'es': { name: 'Español', code: 'es' }, @@ -34,12 +35,14 @@ Locale.languages = { 'nl': { name: 'Nederlands', code: 'nl' }, 'pl': { name: 'Polski', code: 'pl' }, 'pt': { name: 'Português', code: 'pt' }, + 'pt_BR': { name: 'Português (Brasil)', code: 'pt_BR' }, 'ru': { name: 'Русский', code: 'ru' }, 'si': { name: 'සිංහල', code: 'en' }, 'sk': { name: 'Slovenčina', code: 'sk' }, 'sl': { name: 'Slovenščina', code: 'sl' }, 'sr': { name: 'Srpski', code: 'sr' }, 'th': { name: 'ไทย', code: 'th' }, + 'uk': { name: 'Українська', code: 'ukr' }, 'zh': { name: '中文', code: 'zh_CN' } }; @@ -53,5 +56,11 @@ if (!(Locale.language in Locale.languages)) { Locale.language = 'en'; // default } -Ext.Loader.loadScript('/l10n/' + Locale.language + '.js'); +Ext.Ajax.request({ + url: '/l10n/' + Locale.language + '.json', + callback: function (options, success, response) { + Strings = Ext.decode(response.responseText); + } +}); + Ext.Loader.loadScript('//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-' + Locale.languages[Locale.language].code + '.js'); |