To allow the locale to be set for anonymous (non-logged in) users based on their browser’s language settings, you need to enable both the allow user locale
and set locale from accept language header
site settings. Both of those settings are found near the top of your site’s “Basic Setup” settings page.
Once those settings are enabled, users who are not logged into the site will have the Discourse user interface automatically set to the preferred language they have set in their browser. If a non-logged-in user decides to create an account on the site, their locale will be automatically set to the locale that is set by their browser. Note that this will only work if their locale is set to a language that Discourse has been translated into.
The set locale from accept language header
setting has no effect on users who have already created accounts on the site. Once an account has been created, the Discourse user interface will be displayed in the locale that is set on the user’s preferences page. As long as the allow user locale
setting is enabled, existing users can update their locale here:
The set locale from accept language header
needs to have a howto topic written for it. I’m setting myself a reminder for that and will get the topic written soon.