Reputation: 364
I'm working on a mobile website and I want to change languages by the phone native defaults.
Is there any solution to do it? I mean there are three states:
I want to use it on iOS and Android too.
Thx
Upvotes: 3
Views: 297
Reputation: 6293
in case you are still interested in an answer:
you can use navigator.appVersion
, see the following JavaScript snippet:
<script type="text/javascript">
alert(navigator.appVersion);
</script>
and the corresponding result on a Android device with Android 2.2:
you just have to parse for the language, in the example it is de-de.
Sorry, I do not have an iPhone, but the result is probably similar...
Upvotes: 2