summaryrefslogtreecommitdiff
path: root/usr/share/swiftstory/www/swiftstory-config.js
blob: 9a6be3c6ef0b0c3ce544953dd681a26070434264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
});