From 34f3ab900a9cac78acb7a10d1ed60555d98ff822 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 25 Jun 2015 13:28:41 +0100 Subject: handle the multilingual support Signed-off-by: Olivier Gayot --- webapp/cao-config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 webapp/cao-config.js (limited to 'webapp/cao-config.js') 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); +}); -- cgit v1.2.3