Does anyone know of a way to get the phones locale settings for android and ios using javascript?
I found this: http://docs.phonegap.com/en/2.2.0/cordova_globalization_globalization.md.html#Globalization Which looks like will do it, but I'm looking for a why without using any libraries.
Thanks!
Try this:
var language = window.navigator.userLanguage || window.navigator.language;
alert(language);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.