Ok. My language selection is now working.
I have a dropdown with the different languages which is working fine. I would though also like my database to change according to this.
My dropdown has the following values:
And in my translation files I have:
"collectionName":"Nozzles_EU", as one of the lines to choose my DB.
For my dropdown I have value change JS:
var val = Appery("mobileselectmenu10").val();
var option = {lng: val, resGetPath: 'locales/lng/ns.json', fallbackLng: 'en-GB'};//set the translation files path and fallback language
$.i18n.init(option, function(t) {
$(document).i18n(); //Once the translations are loaded translate the whole document
});
As request string for my query I have collectionName as name and nothing as value. If I put in the value Nozzles_EU or Nozzles_US, everything works great. But I would like it to take these values from the translation files instead.
Should this not be enough?
Check out the app here. Type in 20 in both input fields: http://appery.io/app/mobile-frame?src...