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