3 ms·
I've built a lot of websites/apps over my career, almost all of them in multiple languages and regions, and to me the best practice pattern is this (if you can
by jfaucett 9y ago
I've built a lot of websites/apps over my career, almost all of them in multiple languages and regions, and to me the best practice pattern is this (if you can do it, sometimes for various legal/company reasons you can't).
Default your app's language to the first match between the languages you offer and the user/browser's preferred language list. Fallback to English or the country locale, depending on the app's goals/requirements. If the user still changes the language , save it in a cookie/session whatever so on repeat visits the corrected option is selected.
This only solves the language problem though, not regional issues such as an online store in Germany vs Spain which have different deals and products. This is why you should keep a clean separation between locales and regions/countries.
Anyway thats my 2 cents from the trenches.