diff options
Diffstat (limited to 'webapp/cao-config.js')
-rw-r--r-- | webapp/cao-config.js | 13 |
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); +}); |