Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Timely. I’m working on this right now for a product and have everything in place using the accept-language header and then adding a url param.

I’m currently agonizing about how to let the user change their language, because I want to respect locale as well (es-MX vs es-ES for example). And I haven’t found a good UX pattern for changing language+locale. I’ll likely just implement a big list that the user can select, and have the current language be a link that they can click to change via a modal.



As someone who lives in one of those locations mentioned in the article: split out locale and language into different settings. Because they are not the same thing. This article explains that nicely. [1]

You want your users to be able to change their location (and, therefore, locale) and their language independently. The Accept-Language header could be used as a sentinel for language. Then again, I wouldn't outright rely on geoIP to set the locale which is an umbrella for regional differing variables like timezone, date formatting, currency, VAT / Taxes,...

I think it's okay to have your content served, by default, in a language that reflects either the majority of your target audience; or the culture / place you're based in. Changing the locale / language should follow a clear UI pattern e.g. a language switcher & locale switcher in the header; or a clear navigational aid pointing to a context menu. That's how Hetzner works, for instance. Another example is Deliveroo.

[1] https://translatepress.com/locale-vs-language/


Thanks for the advice! I wasn’t planning on using geoIP at all for several reasons - the main two being inaccuracies AND that I’d need to use a paid 3rd party.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: