summaryrefslogtreecommitdiff
path: root/www/swiftstory-config.js
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2018-03-09 13:38:23 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2018-03-09 13:38:23 +0100
commit3ce0c30a4c1518e53bcd6c2773895a39adfb1a1e (patch)
tree1c4ebe8f53f759ba79d3c9f3d31940b7dfe97db8 /www/swiftstory-config.js
parent493b116f73ec3912ca7af3d6ece3434279cbcfb5 (diff)
renamed webapp/ www/
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'www/swiftstory-config.js')
-rw-r--r--www/swiftstory-config.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/www/swiftstory-config.js b/www/swiftstory-config.js
new file mode 100644
index 0000000..9a6be3c
--- /dev/null
+++ b/www/swiftstory-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.substring(0, 3) === 'fr.') {
+ lang = 'fr';
+ } else if (hostname.substring(0, 3) === 'en.') {
+ lang = 'en';
+ }
+
+ swst.set_lang(lang);
+});