nnikolay
nnikolay

Reputation: 1751

Phonegap App detect language and country

I want to program an multilingual / multicountry app and I would like to know what is the best solution to detect the system language of the device and the country, where the user is opening the App in Phonegap?

The App will be a search engine and the information is country specific. What means, that if someone opens the App in Spain, then the App need to select the country ES and if the device has as selected ES as language, then the ES GUI should be loaded.

Upvotes: 2

Views: 8321

Answers (1)

Raymond Camden
Raymond Camden

Reputation: 10857

Did you look at the docs? There is a section on just this - Globalization: http://docs.phonegap.com/en/2.2.0/cordova_globalization_globalization.md.html#Globalization

You may also find useful cordova-plugin-sim which provides countryCode associated with SIM card.

Globalization plugin provides values which are modified by phone user (user preferences), while cordova-plugin-sim provides values set by the SIM card carrier (user cannot change them).

Upvotes: 5

Related Questions