Changing language for non registered user

Hi,

Some of our customers want to be able to visit our discourse in their language (we are in Switzerland, we have to play with french, german, italian and english). Thse customers are not / don’t want to register. How could we add a way for them to change language of Discourse?
I could see a dropdown menu listing some languages in the header. Is there already a plugin, of some code I could use ?

Thanks

If your site is not using a CDN to deliver assets, you could try enabling the set locale from accept language header SIte Setting. When enabled, this setting will set the locale for non-logged-in users from the language preferences they have set on their web browser. For the setting to work, you also need to enable the allow user locale Site Setting.

Hi Simon,

We aren’t using a CDN, indeed :slight_smile: I didn’t saw that switch. Its an experimental feature.. is it still solid ?

Yes. As long as you are not using a CDN, it should reliably set the locale for anonymous users to their web browser’s locale. How well it works for your users will depend on whether or not they have configured their web browsers to use their preferred language. You could try enabling the setting and then asking users about how well it’s working for them.

게스트가 Multilingual Plugin 🌐 의 "Guest locale switcher"를 통해 로케일을 설정할 수 있도록 허용할 수도 있습니다.

메뉴 또는 푸터

또는

이와 관련된 캐싱 문제를 확인해 보셨나요? 이 문제는 CDN을 사용하는 사이트에만 영향을 미칠 것입니다.

네, 캐싱에 대해 꽤 많이 살펴봤습니다. 아직 100% 완벽하게 해결했다고 보기는 어렵지만, (올바르게 해결하는 것이) 가능하다고 생각합니다.

네, 또는 게스트가 브라우저와 다른 로케일을 사용하려는 경우에도 해당됩니다. 예를 들어 도서관이나 학교, 기타 공용 컴퓨터를 사용하거나, 사용자 본인이 다국어 사용자인 경우 등이 있습니다.

로케일 스위처가 활성화된 상태에서도 set locale from accept language header 설정은 기본적으로 작동합니다. 사용자가 스위처에서 다른 로케일을 명시적으로 클릭하지 않은 경우, 해당 설정을 통해 브라우저 로케일이 기본값으로 적용됩니다(가능한 경우).

전체 플러그인 없이 언어 전환기만 사용할 수 있을까요? 이 플러그인 외에 다른 방법이 있을까요?