Is there a way to SET default Language based on Browser Settings?

Is there a way to SET default Language based on Browser Settings? for register and non-register Users

is the default settings of the SITE is English and I’m in FF or Chrome with Spanish…

Is that Possible?

Regards.,

1 Like

Discourse uses the browser’s locale to set the user’s locale if the set locale from accept language header site setting is enabled. The locale will be set for anonymous users (and also for new users who register on the site) from their browser’s language header.

It will only work correctly if the site setting login required is enabled. For sites that do not have the login required setting enabled, the set locale from accept language header setting can cause the site to be displayed in the wrong locale for non-logged-in users. The reason for this issue is that we cache the content that is displayed to non-logged-in users to speed up the site’s load times.

Note that all your users will be able to change their language from their user preferences.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

The set locale from accept language header has had its issues ironed out and is no longer “experimental”.

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

2 Likes