--:--:--Douala, Cameroon

Available for work

Bilingual

The default language is not the one you configured

A site set to English greeting every French visitor in French, with nothing broken and every check passing.

5 min read

A bilingual build was configured with English as the default locale. It greeted French-speaking visitors in French. Nothing was broken, both languages were complete, and every route check passed. The site was not failing, it was answering in the wrong language.

What defaultLocale actually does

It is the fallback, not the default. Locale detection is on unless you turn it off, so the proxy reads the Accept-Language header and the stored cookie first, and only reaches for your configured locale when neither answers. In practice neither never happens, because every browser sends the header.

So the config says English, the visitor's browser says French, and the visitor wins. That is correct behaviour and almost never what anyone intended when they typed the line.

Why nothing catches it

  • The build passes: both catalogues are complete
  • Every route answers 200, in one language or the other
  • Screenshots look right, because you are probably testing in your own browser
  • It only shows up when someone with a different Accept-Language opens the site

Turn detection off if you want the configured default to mean what it says, then check it the only way that proves anything: request the bare domain three times with three different Accept-Language headers and read what comes back.

A site that is answering in the wrong language is not broken. That is exactly what makes it survive review.