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 ?
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.
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.
네, 캐싱에 대해 꽤 많이 살펴봤습니다. 아직 100% 완벽하게 해결했다고 보기는 어렵지만, (올바르게 해결하는 것이) 가능하다고 생각합니다.
네, 또는 게스트가 브라우저와 다른 로케일을 사용하려는 경우에도 해당됩니다. 예를 들어 도서관이나 학교, 기타 공용 컴퓨터를 사용하거나, 사용자 본인이 다국어 사용자인 경우 등이 있습니다.
로케일 스위처가 활성화된 상태에서도 set locale from accept language header 설정은 기본적으로 작동합니다. 사용자가 스위처에서 다른 로케일을 명시적으로 클릭하지 않은 경우, 해당 설정을 통해 브라우저 로케일이 기본값으로 적용됩니다(가능한 경우).