Skip to content

Added doc about setting up languages on registration. #1432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions site/docs/v1/tech/guides/advanced-registration-forms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Advanced registration forms let you build multi-step custom registration and adm
* <<Editing User Data In the Admin UI>>
* <<Using the API to Manage Forms>>
* <<Consents>>
* <<Email Localization>>
* <<Form Fields and Validation>>
* <<Special Considerations>>

Expand Down Expand Up @@ -627,6 +628,20 @@ The consent field will have a name automatically generated based on the consent
consents['dd35541d-e725-4487-adba-5edbd3680fb8']=I consent to sharing my data with affiliated companies
```

== Email Localization

Emails are localized based on the user preferred language attributes. link:/docs/v1/tech/core-concepts/localization-and-internationalization[Learn more here about the different ways FusionAuth localizes content].

Using advanced registration forms, you can set this attribute on registration. FusionAuth will then localize any initial emails, such as a password setup or email verification email.

To do so, add a custom field to your form setting the [field]#user.preferredLanguages# field. You can use the default one that ships with FusionAuth, as below.

image::guides/advanced-registration-forms/setup-locale-selection.png[Add locale choice to registration form.,width=1200]

This will build a select box with a list of all supported locales. If you'd prefer to limit it to a certain subset, copy the default field and edit the allowed values.

You may also add this as a hidden field and set it via JavaScript if you'd rather not display the dropdown.

== Form Fields and Validation

Making sure user registration data meets your quality requirements is important. FusionAuth provides multiple ways to validate user input during the registration process.
Expand Down Expand Up @@ -706,6 +721,7 @@ Assume you've enabled the Facebook identity provider and allowed for registratio

After a user signs up with Facebook, they'll be dropped back into the registration flow on the second step. They'll be required to complete the registration from from the second step onward before they are fully registered.


++++
{% capture relatedTag %}feature-advanced-registration-forms{% endcapture %}
{% include _doc-related-posts.liquid %}
Expand Down