Multilingual sites: ask for preferred language at registration

Thank you very much for the feature allowing users selecting their preferred locale. Very helpful for communities living multilingual realities!

Have you considered to allow users to define their preferred locale at registration time? This is the point of time when it makes more sense for a user to make that choice in order to discover the new community in their preferred language.

Offering selection of locale in the registration form would solve two related problems:

  • Discobot would send users its first message in their preferred language already. That makes Discobot cooler and easier to be understood by everyone. Currently there is no workaround for this, Discobot’s first message will arrive in the default language always.
  • Discovering the possibility of changing your locale takes a certain skill, especially when you are a new user, perhaps using a complex interface for the first time, perhaps in a language you are not very fluent. Users need to know that such feature exists and can be found in almost the very last corner of their user settings. This can be solved socially by adding the note in the welcoming topic, but it is suboptimal for various reasons.

Selection of a preferred language is basically a one-time choice. Registration is the right time for it. Implementation of this feature is probably not that complex?

「いいね!」 15

Sure we are open to a community pr in this area, need to see mockups first, optional default off

「いいね!」 6

How about something like this?

I feel like we need a better copy for the instructions. IMO it shouldn’t exceed the width of the selectbox, but I couldn’t come up with a shorter one. Any ideas?

「いいね!」 7

“Language: English” is quite self-explanatory. What about just removing the instructions?

「いいね!」 1

I feel like this is a tad too late, what if categories allowed you to set locale in category settings?

Then when anon clicks on a topic or category in such a locale the interface could switch locales and clicking register would already be in the correct locale which could be carried over

「いいね!」 3

Why the registration form is too late? If the user reached that form is because they could find their way in the default language of the forum, which would appear as default also in the form (i.e. Russian if the default is Russian, not English).

I guess we have two fundamental types of potential multilingual Discourse sites

  1. Support forums and similar international services or communities where you might find users from everywhere. Many unrelated languages can be expected, English acts as lingua franca, most users don’t know many of the languages.
  2. Multilingual communities sharing territory or cultural background. 2-3 related languages can be expected, English might not be one of them, and most users can probably read all of them and speak/write at least one.

In the first case different languages will be probably structured and separate. Switching locales for anonymous users and proceeding with @sam’s idea might work well.

However, in the second case things may (and frequently do) get quite mixed, and frictions are not uncommon. Imagine forums combining Russian-Ukranian, Bosnian-Croatian-Serbian…, Finnish-Swedish, Catalan-Spanish, Arabic-French… Anonymous users could be changing locales click after click. There administrators might prefer to avoid tying categories or topics to languages altogether, because that promotes some kind of segregation. Imagine a proud Ukranian speaker that, after reading the last topic in Russian, is offered Russian registration in a (maybe proud) Ukranian community.

If you have any friends from these regions in Facebook, go visit their walls and you’ll see. I bet it can be the same for i.e. Hebrew/English.

To make it even funnier, it is not uncommon that users reading, say, Catalan/Spanish with native fluency still prefer English UI because they are used to it. Therefore, you may have communities producing no English content but still having users who will choose the English locale.

「いいね!」 3

There is already a site setting (set locale from accept language header) which uses the browser’s Accept-Language HTTP header for anonymous users. I guess this could be used to set the initial value for the locale on the registration form and it might already set the locale during signup.

You can find out more about this feature in Variable default interface language for new users. If I remember correctly there were some issues with caching.

「いいね!」 6

There is a VERY strong order of operations problem here.

Yes I want to correct and improve this stuff but:

  • This MUST happen first, Is there any way to let language selector display 'English' instead of 'en'? I find it odd to even be talking about this stuff without this in place.

  • I feel like in many communities the category based “language” selection both solves a big problem with signup and leaves users with less choice which is great.

  • Involving Discobot in a multi lingual interface forum where people generally speak multiple language is a great way of introducing the concept of preference.

  • Whatever solution we come up with for signup should be more inline with what facebook do. Cause plenty of people on the planet have no idea what the glyphs “Language” mean. So how are they expected to even fill out the form.

「いいね!」 8

Facebook sets their login form from the accept language headers. You have to clear your browser’s cookies to see it. A big difference between facebook and Discourse is that facebook doesn’t display content to anonymous users, so they only have to deal with the login page.

「いいね!」 2

Sorry, was a bit vague there.

I meant that a combo box is kind of weak on the signup page. Instead a footer on the login modal that displays a list of languages (spelled in the actual language) is the way to go.

It does beg the question about how someone is going to even select “Sign Up” when they have no idea what those glyphs mean, which is why I am so uneasy about this.

I think automagically inferring language from the browser’s language setting is always preferable to what @icaria36 proposed, above, and we do support that via an experimental :man_scientist: site setting, set locale from set language header

It utterly destroys anon caching though which is why it is such a dangerous setting and not enabled by default.

So maybe this request only matters in the very narrow case of people who are multi-lingual, and hitting websites broadly available in multiple languages, who say

Oh my browser says I am in France but I speak French, English, German, and Chinese and right now I prefer to use Chinese on this particular website.

Furthermore, the “explicit language set per category” thing is also extremely strong, and matches the topic @erlend_sh already set up about localizing Discourse for multi-language sites.

「いいね!」 1

Maybe the anonymous cache key could be set differently for forums that require login to view content. It would require having login_required and possibly supported_locales available as Global Settings. It could be useful for customer support forums.

「いいね!」 2

Anon cache can add another header to its cache key, its quite a straightforward change.

「いいね!」 3

Getting real tired of the off-topic posts here and I will be deleting aggressively. So before posting any more replies, re-read the title and first post and ask yourself, “Am I sure I am posting something that is actually what this topic is about?”

「いいね!」 3

このリクエストはほぼ3年前のものですが、私も賛同の意を表します。現在の仕組みは、英語を話さないユーザーにとって全く混乱を招いています。サインアップページはブラウザの言語で表示されますが、参加するとすぐに、アプリの設定が何を意味すると期待しているにもかかわらず、アプリは英語に戻ってしまいます。

「Accept-Language ヘッダーからロケールを設定」設定が有効な場合の期待される動作は、ヘッダー内で検出されたロケールでアカウントが作成されることです。ユーザーはあなたのサイトでどのようにアカウントを作成していますか?アカウントが SSO 経由で作成されている場合、このアプローチは機能しません。SSO ログインの場合、ロケールは SSO ペイロード内で設定する必要があります。
この設定が期待通りに機能していることを確認するために、一時的に https://try.discourse.org/ でこれを有効にし、ブラウザのロケールをフランス語に設定して、ユーザー名/パスワードでの登録と Twitter 認証によるアカウント作成の両方でアカウントを作成しようとしました。どちらの場合も、私のユーザーのロケールは正しくフランス語に設定されました。現在、https://try.discourse.org/ でその設定は無効化しています。

「いいね!」 2

「Accept-Language ヘッダーからロケールを設定」オプションが有効な場合の期待される動作は、ヘッダー内で検出されたロケールでアカウントが作成されることです。

私も同じように思っていました。

ユーザーはあなたのサイトでどのようにアカウントを作成していますか?SSO 経由でアカウントが作成されている場合、このアプローチは機能しません。SSO ログインの場合、ロケールは SSO ペイロード内で設定する必要があります。

ハンバーガーメニューから「管理」→「ユーザー」→「招待を送信」→「招待を送信」をクリックし、ダイアログが表示されます。そこにメールアドレスを入力して「招待を送信」をクリックします。ユーザーを追加する他の方法を知りません。

この設定が期待通りに機能しているか確認するため、一時的に https://try.discourse.org/ でこれを有効にし、ブラウザのロケールをフランス語に設定して、ユーザー名とパスワードでの登録、Twitter 認証でのアカウント作成の両方を行いました。どちらの場合も、ユーザーのロケールは正しくフランス語に設定されていました。現在は https://try.discourse.org/ でこの設定を無効にしています。

なぜあなたの結果が異なるのか分かりません。予備のメールアドレスで自分自身を招待し、予備のブラウザをフランス語に設定して、そのブラウザでサインアップリンクを開くと、アカウント確認ページ(名前とパスワードを選択するページ)はフランス語になりますが、それ以降のすべてのページは英語になります。

「いいね!」 1

それが問題の原因です。招待を受け入れてアカウントが作成される場合、ユーザーのブラウザのロケールに関係なく、ユーザーのロケールはサイトのデフォルトロケールに設定されます。これは修正可能な可能性があります。

「Accept-Language ヘッダーからロケールを設定」設定は、ユーザーが「サインアップ」ボタンをクリックしてサインアップフォームを送信することでアカウントを登録する際に、正しいロケールでアカウントを作成します。招待を受け入れてアカウントが作成される際にも、同じロジックを適用できる可能性があります。

「いいね!」 3

@simon、それは素晴らしいアイデアですね。例えば、フランス語圏のプログラムを修了した方がコミュニティに参加することがあります。彼らがフランス語を話していることは分かっています。

そのため、彼らにコミュニティへの招待を送る際、デフォルトの言語設定をフランス語にできるとうれしいです。

「いいね!」 1

招待を受け入れる際に言語ヘッダーからロケールを設定するのは可能だと思います。現在、ユーザー名とパスワードによる登録で使われているロジックと類似したものを使うはずです。

あなたが求めているのは、招待を「送信」する時点でユーザーのロケールを設定できる機能だと考えられます。これは以前も要望されたことがあるようです。一部のサイトにとって有用な機能であることは理解できますが、実装されるには、まずいくつかのサイトから同様の要望が出る必要があるでしょう。

「いいね!」 3