My current strategy for choosing a language to present a Web page or an app is:
I look at HTTP
Accept-Language from the browser, or "Locale Settings" from the phone, then:
- If the language is not English, then use this language.
- If the language is English, then do a IP to country lookup, then pick the first language listed in the GeoNames country table for the looked-up country.
So a Swiss person with English settings would get "de-CH" (Swiss German), which is the most common language in Switzerland. It's not perfect, but a fair tradeoff for people who don't have proper settings.
The reason for this is that I've come to learn that many people have English as their browser or phone settings, even though they don't have English as their mother tongue. I for myself, have an Operating System in English, but want Web pages in my native, non-English, tongue.
Does anyone have better approaches to this without intricate logic and without user interaction (no dialog boxes asking the user to choose language)?
Edit: I set
Accept-Language to English only, and Facebook came up in English (contrary to what I expected). At the same time, the clickable language links at the bottom lists my native language, so it must be IP-based (there is nothing else to base this guess on). Though it also lists several foreign languages not spoken here. Not sure how they assemble this list.