summaryrefslogtreecommitdiff
path: root/usr/share/swiftstory/www/swiftstory-config.js
diff options
context:
space:
mode:
Diffstat (limited to 'usr/share/swiftstory/www/swiftstory-config.js')
-rw-r--r--usr/share/swiftstory/www/swiftstory-config.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/share/swiftstory/www/swiftstory-config.js b/usr/share/swiftstory/www/swiftstory-config.js
new file mode 100644
index 0000000..9a6be3c
--- /dev/null
+++ b/usr/share/swiftstory/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);
+});