Does your code above require a case 'en' and break; to detect the languages?
how then you add these string for instance into a ::PassageFooter ?
I think I am far from getting it. This is my progress within the javascript area
function initLanguage() {
switch (setup.i18n.langs[settings.lang]) {
case 'en':
l10nStrings.settingsTitle = 'Einstellungen';
break;
case 'fr':
l10nStrings.settingsTitle = 'Paramètres';
break;
}
setup.myStrings = {
en : {
someString : 'TestEN',
anotherString : 'TestEN'
},
fr : {
someString : 'TestFR',
anotherString : 'TestFR'
}
};
$('html').attr('lang', setup.i18n.langs[settings.lang]);
}
function changeLanguage() {
window.location.reload();
}
Setting.addList('lang', {
label : 'Language.',
list : setup.i18n.labels(),
default : setup.i18n.labelFromCode('en'),
onInit : initLanguage,
onChange : changeLanguage
});
postrender['i18n-passage-include'] = function (content) {
var passage = State.passage + '_' + setup.i18n.langs[settings.lang];
$(content).empty().wiki(Story.get(passage).processText());
};