Choose language during registration or login

We want our users to choose their language when they first register for the community or also if they log in. How do the settings need to be adapted? We have a welcome message in two language and would like to be able to let the user choose which language is displayed.

Thank you in advance!

1 Like

If you enable the allow user locale and set locale from accept language header Discourse settings (both are found near the top of the “Basic Setup” settings) users will have their language automatically set to the locale that is set on their web browser when they first register on the site. For many cases this would work to set the proper language for a user.

Discourse doesn’t have an option to allow users to manually select their language when they register their account. I can see how this would be a useful feature for some sites though.

As long as the allow user locale site setting is enabled, users can change their locale after signing up for the site. This is done from the Interface section of the user’s preferences page:

There are some existing discussions on Meta about multi-lingual sites. There are a few ideas in this topic that could be helpful: How to structure a multilingual community.

5 Likes

If you use sso you can set this up on the registration form. This is how it works at https://Namati.org/join.

2 Likes

That would be an awesome feature. :crossed_fingers:t2:

2 Likes

Hi Tobias,

great implementation. How did you create this registration form? It looks very professional! :slight_smile: Our current registration process is very basic. The registration form you created suggests exclusiveness! It would also be very welcoing for diverse user to choose their language/country of orgin. Also the question where the user has heard from us is great!

Thank you so much in advance!

2 Likes

Thank you so much for the detailed instruction!!

1 Like

This is done in Wordpress using the wp discourse plugin and gravity forms. There is some custom code dealing with syncing of preferred interface language @hudsonwebdev might be willing to explain for you.

4 Likes

@tobiaseigen Thank you!!

2 Likes

@hudsonwebdev Hi, would you mind explainig it to me?

2 Likes

@roemer Sorry for the delay. As Tobias mentioned it is a combination of Wordpress and Gravity Forms.
Gravity forms allows you to “hook” into the submission. When the gravity form is submitted you tell it to run a piece of code that you write in you theme or plugin files. That code is generally made up of PHP using a CURL statement to connect to the discourse API. You can send information that you collect in your gravity form directly to discourse.

1 Like