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

It actually doesn't determine it by the country the request is coming from.

How it works is fully documented here: https://github.com/ladjs/i18n#i18nmiddlewarectx-next

1) Check URL (e.g. if /de or /de/ then it's a de locale - as long as de is a supported locale)

2) Use the custom function (if provided by the detectLocale parameter) for locale detection

3) Check the "locale" cookie value (or whatever the cookie option is defined as)

4) Check Accept-Language header

Regarding nothing being translated, there was an issue with our locales folder sync and that's being resolved soon!



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

Search: