aboutsummaryrefslogtreecommitdiff
path: root/web/locale.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-11 19:47:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-11 19:47:56 +1300
commit40aa96e31efd48f4acba92ee3b90acfa09dc4524 (patch)
tree98ed85f44bc0d46ec716e04d55777508dd03c26e /web/locale.js
parent00ae71b5b0dbc62f7cfbdb111afe4773f6d4178e (diff)
downloadtrackermap-server-40aa96e31efd48f4acba92ee3b90acfa09dc4524.tar.gz
trackermap-server-40aa96e31efd48f4acba92ee3b90acfa09dc4524.tar.bz2
trackermap-server-40aa96e31efd48f4acba92ee3b90acfa09dc4524.zip
Change language files format to json
Diffstat (limited to 'web/locale.js')
-rw-r--r--web/locale.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/locale.js b/web/locale.js
index ff07bf166..c794564dd 100644
--- a/web/locale.js
+++ b/web/locale.js
@@ -53,5 +53,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');