--
i know this was a topic before but i can´t find a proper solution for it.
I want to detect the language on the devices with phonegap, so i can redirect the user to the right indexLanguageX.html document.
I´ve got this code from the phonegap documentation:
function checkLanguage() { navigator.globalization.getPreferredLanguage( function (language) {alert('language: ' + language.value + '\n');}, function () {alert('Error getting language\n');} ); }This should check the preferred language and alert it, right? But it doesn´t work on my android device.. I also tried it with the phonegap alert version, doesn´t work either.
Can somebody tell me how i can get this to work?
After i get the alert, i still need to do the redirect. I thought this would work with something like:
function (language) {if (language.value=us_en) { window.locaton="indexLanguageX.html"}},
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.