This is also incorrect. I18n.locale is set from the header only if there is no logged in user. See here:
Now, I suspect that when the user first signs up, current_user is not set, thus kick-starting the whole get-the-language-from-header process, and then the I18n.locale got persisted into the user’s account.
However, this is certain NOT how it is done when a user redeems an invite.
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.
Pregunta rápida sobre esto en relación con el complemento de traductor. ¿Funcionará el complemento de traductor en este escenario si la restricción de traducción del complemento se establece en Todos?
(dado que la diferente configuración regional es lo que activa el botón de traducción en primer lugar)
Solo como información, no creo que el grupo ‘Todos’ funcione correctamente con esa configuración de Translator. Tampoco está disponible para anónimos, por lo que se recomienda establecerlo en TL0 para ese grupo.