Dennis
Posts: 0
Joined: Tue May 05, 2015 1:29 pm

database collections based on language

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;

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

database collections based on language

Hello Dennis,

We are sorry, but unfortunately custom app logic is outside the scope of standard Appery.io platform support. You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about it: http://appery.io/services/#Advisory_Pack

Return to “Issues”