Get the device language for localization?


#1

Hi,
It is possible to get the device language for localization?

Thanks!


#2

You could use the browser language:
Check:
navigator.language || navigator.userLanguage


#3

Great!

I think it also helps me.

Thanks!


#4

In most cases the browser language is system/device language, but if someone wants to browse in chinese let him enjoy your app in chinese :wink: ^^


#5

I made use of the Apache Cordova Globalization plugin to get the device language and locale.