Advise HN: If auto-detecting language, provide a way to change it
A frustrating UI pattern when traveling around the world. It's great if websites auto-detect your location and set the language on your first visit. But a shocking number do not allow you to change it afterwards, or the implementation is buggy/isn't saved across sessions.
VPNs help solve this problem, but it's an easy to fix UI flaw.
7 comments
[ 0.24 ms ] story [ 34.1 ms ] threadIt would be nice if language selection happened via the browser UI rather than the site itself.
Fortunately the future is at least bright on the automated translation front.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...
In regards to browser support, you are correct—however, changing preferences can be cumbersome.
Interestingly, there appears to be several browser add-ons that provide Accept-Language quick-switch capability in the browser UI, and that's more in line with what I had in mind with my original comment.
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.