aboutsummaryrefslogtreecommitdiff
path: root/web/app.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-26 21:49:57 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-26 21:49:57 +1200
commitd8cd9c2bba2b3bea5f6af15189f868fa6cffd9b0 (patch)
treed5db965d1e8aaece457f300ddc432caf5b6a25d5 /web/app.js
parent15a540f2b585bb8c7cd7097386957ee332e3d202 (diff)
downloadtrackermap-server-d8cd9c2bba2b3bea5f6af15189f868fa6cffd9b0.tar.gz
trackermap-server-d8cd9c2bba2b3bea5f6af15189f868fa6cffd9b0.tar.bz2
trackermap-server-d8cd9c2bba2b3bea5f6af15189f868fa6cffd9b0.zip
Implement language selection
Diffstat (limited to 'web/app.js')
-rw-r--r--web/app.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/web/app.js b/web/app.js
index 8ddceffce..ed04f3ece 100644
--- a/web/app.js
+++ b/web/app.js
@@ -19,16 +19,16 @@ Ext.Loader.setConfig({
});
{
- var available = {
- 'cn': true,
- 'de': true,
- 'en': true,
- 'es': true,
- 'fr': true,
- 'pl': true,
- 'pt': true,
- 'ru': true,
- 'th': true
+ var availableLanguages = {
+ 'cn': '中文',
+ 'de': 'Deutsch',
+ 'en': 'English',
+ 'es': 'Español',
+ 'fr': 'Français',
+ 'pl': 'Polski',
+ 'pt': 'Português',
+ 'ru': 'Русский',
+ 'th': 'ไทย'
};
var language = Ext.Object.fromQueryString(window.location.search.substring(1)).locale;
@@ -37,7 +37,7 @@ Ext.Loader.setConfig({
language = language.substr(0, 2);
}
- if (!(language in available)) {
+ if (!(language in availableLanguages)) {
language = 'en'; // default
}