function getLocale() {
if ( navigator ) {
if ( navigator.language ) {
return navigator.language;
}
else if ( navigator.browserLanguage ) {
return navigator.browserLanguage;
}
else if ( navigator.systemLanguage ) {
return navigator.systemLanguage;
}
else if ( navigator.userLanguage ) {
return navigator.userLanguage;
}
}
}
Courtesy: http://www.ebessette.com/d/ClientSideLocale
No comments:
Post a Comment