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.
Ja, ich habe mich ziemlich intensiv mit dem Caching auseinandergesetzt. Ich bin mir noch nicht zu 100 % sicher, dass es perfekt funktioniert, aber ich denke, es ist möglich, es richtig hinzubekommen.
Ja, oder falls der Gast eine andere Spracheinstellung (Locale) als die seines Browsers verwenden möchte. Zum Beispiel, wenn er einen Computer in einer Bibliothek, einer Schule oder einem anderen geteilten Rechner nutzt, oder wenn er selbst mehrsprachig ist.
Die Einstellung „Locale aus dem Accept-Language-Header übernehmen