summaryrefslogtreecommitdiff
path: root/webapp/cao-config.js
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-25 13:28:41 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-25 13:28:41 +0100
commit34f3ab900a9cac78acb7a10d1ed60555d98ff822 (patch)
tree10c8510ff15b4f5ebbf39669a84378a3845df91b /webapp/cao-config.js
parent349d467d9bae3e8d2cfd121ab63ad437a8e934bd (diff)
handle the multilingual support
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'webapp/cao-config.js')
-rw-r--r--webapp/cao-config.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/webapp/cao-config.js b/webapp/cao-config.js
new file mode 100644
index 0000000..2082e3a
--- /dev/null
+++ b/webapp/cao-config.js
@@ -0,0 +1,13 @@
+$(document).ready(function() {
+ var lang;
+ var hostname = document.location.hostname;
+
+ /* XXX replace this with your desired behaviour */
+ if (hostname.startsWith('fr.')) {
+ lang = 'fr';
+ } else if (hostname.startsWith('en.')) {
+ lang = 'en';
+ }
+
+ cao.set_lang(lang);
+});