«Set locale from param» 및 콘텐츠 지역화 문제

We’ve been rather happy with the content localisation, but found an issue regarding
Set locale from param setting.

It should allow setting an anonymous user’s locale via the ‘tl’ URL param, e.g. ?tl=es. Currently if we put e.g. ?tl=fi to forum URL, it correctly shows the UI and forum headers in Finnish for anonymous user. Yet if I click any thread open, it shows them incorrectly according browser’s Accept language header (English in this case).

If I understood correctly, priority should be ?lang= in the URL, then the locale cookie, then Accept-Language? Still at least in our case it seems that using ?tl only changes UI language but not shown translations.

As for the context what we’re trying to achieve:

  • Guide users to Swedish forum version (tl=sv) from our .se site, and to Finnish version (tl=fi) from our .fi site and so on.
  • For anonymous users browsing globally, it would be nice to have the browser locale header setting as default if we or user haven’t pre-selected the language.

Any thoughts?

2개의 좋아요

음, 알겠네요.

저도 그런 이상적인 경험을 기대하고 있었습니다. 어떤 이유에서인지, 제 원래 구현 방식이 그렇게 작동할 거라고 생각했네요.

문제를 다른 분들도 이해하실 수 있도록 여기 녹화 파일을 추가했고, 이 문제를 해결하기 위해 작업하겠습니다. 의도된 동작이 아니므로 이 이슈를 Contribute > Bug 채널로 옮길 예정입니다. :slight_smile:

녹화 파일

4개의 좋아요

We have a fix here -

https://github.com/discourse/discourse/pull/35942


The fix is deployed on meta and here’s an example of anon view in a spanish browser and search term leading to a tl=es meta url -

3개의 좋아요

This topic was automatically closed after 5 days. New replies are no longer allowed.