The FusionAuth theme can be localized to better server your end users. In each theme you may specify one to many language specific message bundles to translate text rendered in a theme into a user’s preferred language.
If you’re just looking into localizing your theme, take a look at our community provided and maintained message bundles.
You may also want to review our localization and internationalization documentation.
In the Messages tab of your theme editor you may specify one to many languages. Once you have specified a key and value the key may be used in any template to display a localized string.
Consider the following message bundle and theme usage example with English and German messages defined.
If I have selected German as my locale, I will be greeted with
Guten Tag rendered on the page, if I have English selected I will instead find the greeting
The locale is determined by the locale value. The locale is resolved on each request using the following precedence:
localerequest parameter if present on the HTTP request. This is useful if you already know the user’s preferred locale prior to redirecting them to FusionAuth to complete authentication.Example request
The user selects a language during login using the locale selector or there is a
Accept-Languageheader if present on the HTTP request
The system default locale as determined by the underlying operating system
The user’s preferredLanguages settings are not used to select a locale for the hosted login pages.
Identity Provider Login Buttons
The button text displayed in the login pages for identity providers such as Google, Facebook or SAML, is retrieved from the identity provider configuration. The API documentation documents how to set and retrieve this value, which is
This text is used in the default theme like so:
buttonText value stored in the identity provider configuration cannot be localized.
However, you can replace this line in the theme template to pull a localized value from the messages bundle.
First, add the translated text to all messages bundles, including the default bundle:
google-login=Login With Google
google-login=Mit Google Einloggen
Then, update the relevant templates to display the localized text. Here’s an excerpt of an updated login page:
How helpful was this page?