Hi, I’m currently using localization to get the browser language and translate my experience to dutch if any people from the Netherland use my experience. Since it’s an AR experience it has to work in mobile too, but when I test it on mobile the language never changes to nl-NL, although I have my device set to the Netherlands. I now use the following code to get the language:
var userLanguage = window.navigator.userLanguage || window.navigator.language;
console.log(userLanguage);
if(userLanguage != 'nl-NL' && userLanguage != 'nl'){
userLanguage = 'en-US';
}else{
userLanguage = 'nl-NL';
changeTextToNL();
}
this.app.i18n.locale = userLanguage;
Does this code have to be changed in order to work for mobile too?