Localisation bug for anonymous users with ?tl=[lang]

Hi,

this is partly similar to an issue that was fixed last year. I think things worked fine after the fix in November, but was broken in January :thinking:

Issue:
We have all following fields enabled on our forum:

  • Set locale from accept language header
  • Set locale from cookie
  • Set locale from param

When accessing our forum as anonymous user with language parameter (e.g. ?tl=fi), you correctly see thread titles in Finnish, even though your browser is in English. Yet, when you scroll a bit down, some titles show up in English. Also when you open one of the threads, either Finnish or English ones, the messages in thread show up in English. This happens even though you see FI as chosen language in the top right corner.

Here’s a screen capture to show how it works. As far as I know, this happens only for anonymous users. You can test it yourself on forum.inderes.com.

1 Like

Has anyone else experienced similar issue, where ?tl doesn’t work correctly with the browser language?

Hey Mikka, I believe the folks over at Topic list is shown in a language (DE) but has one (DE) topic not translated are also facing the same issue.

I think I have found the bug and will update you here sometime this or next week.

1 Like

The bug should be fixed here - FIX: Use resolved locale for localizations, instead of param+site default fallback by nattsw · Pull Request #39395 · discourse/discourse · GitHub

The feature evolved, but the resolution of the locale (for tl param) was outdated, causing the bug.

1 Like