Ernoriel
Ernoriel

Reputation: 89

How to detect a "phone" language? (not browser but phone)

I have to build a localized application in JavaScript (jQuery Mobile, phonegap). Each time I ask the language(navigator.language) it returns me "en" even when I set the phone language on French or Spanish.

How can I detect the phone language instead of the navigator language which don't seem to change accordingly to phones?

Upvotes: 2

Views: 2616

Answers (1)

rshea0
rshea0

Reputation: 12249

It is not possible to detect the phone's language as far as I know. Using the user-agent or navigator.language are the only automated ways.

However, it is probably safest to just ask the user what language they speak.

Upvotes: 1

Related Questions