Thank you Sergiy, i just really want to get going with this... But won't work for me..
I now have this for my "on value change" for the mobileselectmenu10:
var langCollectionMapping = {
"en-GB": "Nozzles_EU",
"en-US": "Nozzles_US"
};
//Where "selectName" is your select name.
var currentLanguage = Apperyio("mobileselectmenu10").val();
alert("current language is = " + currentLanguage);
var currentCollectionName = langCollectionMapping[currentLanguage];
alert("current collection is = " + currentCollectionName);
var option = {lng: currentLanguage, resGetPath: "locales/"+ langCollectionMapping[currentLanguage] +"/translation.json"}; //Pass the initialization language,
//set the translation files path and fallback language
$.i18n.init(option, function(t) {
$(document).i18n(); //Once the translations are loaded translate the whole document
});
And for my mapping js for service request parameter CurrentCollectionName:
var langCollectionMapping = {
"en-GB": "Nozzles_EU",
"en-US": "Nozzles_US"
};
//var val = Appery("mobileselectmenu10").val();
var currentCollectionName = langCollectionMapping[val];
alert("currentCollectionName = " + currentCollectionName);
return currentCollectionName;