Comment

Comment by arielcostas

At work we have it implemented as follows:

1. Check if there is a language cookie set previously 2. If no cookie, check if the Accept-Language is present and contains one of the supported locales 3. If no Accept-Language matches, use the fallback application language

Not that hard to implement, except perhaps parsing the Accept-Language preferences with their quality value can be cumbersome.

parent arielcostas 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton