From 493b116f73ec3912ca7af3d6ece3434279cbcfb5 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 9 Mar 2018 13:38:22 +0100 Subject: renamed the project SwiftStory Signed-off-by: Olivier Gayot --- webapp/swiftstory-config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 webapp/swiftstory-config.js (limited to 'webapp/swiftstory-config.js') 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); +}); -- cgit v1.2.3