fix i18n and currency link to respect respectively currency and i18n current user choice

This commit is contained in:
Michael Muré 2014-09-15 20:58:38 +02:00
parent 62ae758e22
commit 89d4cca797
3 changed files with 12 additions and 0 deletions

View file

@ -10260,6 +10260,10 @@ janin.currency = {
document.title = janin.currency.name() + " " + ninja.translator.get("title");
document.getElementById("siteTitle").alt = janin.currency.name() + " " + ninja.translator.get("title");
// Update i18n link
document.getElementById("cultureen").href = "?culture=en&currency=" + janin.currency.name().toLowerCase();
document.getElementById("culturefr").href = "?culture=fr&currency=" + janin.currency.name().toLowerCase();
if(ninja.seeder.isDone())
{
// Regenerate a new wallet when not expensive
@ -12334,6 +12338,8 @@ for(i = 0; i < janin.currencies.length; i++) {
if(janin.currencies[i].donate == null)
continue;
currencieslist += "<a href='?currency="+janin.currencies[i].name;
if (ninja.getQueryString()["culture"] != undefined)
currencieslist += "&culture=" + ninja.getQueryString()["culture"];
currencieslist += "'>"+janin.currencies[i].name+"</a> ";
j++;
}

View file

@ -43,6 +43,10 @@ janin.currency = {
document.title = janin.currency.name() + " " + ninja.translator.get("title");
document.getElementById("siteTitle").alt = janin.currency.name() + " " + ninja.translator.get("title");
// Update i18n link
document.getElementById("cultureen").href = "?culture=en&currency=" + janin.currency.name().toLowerCase();
document.getElementById("culturefr").href = "?culture=fr&currency=" + janin.currency.name().toLowerCase();
if(ninja.seeder.isDone())
{
// Regenerate a new wallet when not expensive

View file

@ -37,6 +37,8 @@ for(i = 0; i < janin.currencies.length; i++) {
if(janin.currencies[i].donate == null)
continue;
currencieslist += "<a href='?currency="+janin.currencies[i].name;
if (ninja.getQueryString()["culture"] != undefined)
currencieslist += "&culture=" + ninja.getQueryString()["culture"];
currencieslist += "'>"+janin.currencies[i].name+"</a> ";
j++;
}