2016-06-01 08:49:54 +00:00
|
|
|
[[_themes]]
|
2016-05-14 14:48:22 +00:00
|
|
|
=== Themes and Internationalization
|
2016-05-13 19:49:56 +00:00
|
|
|
|
2017-08-28 12:50:14 +00:00
|
|
|
Themes allow you to change the look and feel of any UI in {project_name}. Themes are configured per realm. To change
|
2016-05-13 19:49:56 +00:00
|
|
|
a theme go to the `Realm Settings` left menu item and click on the `Themes` tab.
|
|
|
|
|
|
|
|
.Themes Tab
|
2017-08-28 12:50:14 +00:00
|
|
|
image:{project_images}/themes-tab.png[]
|
2016-05-13 19:49:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
Pick the theme you want for each UI category and click `Save`.
|
|
|
|
|
|
|
|
Login Theme::
|
|
|
|
Username password entry, OTP entry, new user registration, and other similar screens related to login.
|
|
|
|
Account Theme::
|
|
|
|
Each user has an User Account Management UI.
|
|
|
|
Admin Console Theme::
|
2017-08-28 12:50:14 +00:00
|
|
|
The skin of the {project_name} Admin Console.
|
2016-05-13 19:49:56 +00:00
|
|
|
Email Theme::
|
2017-08-28 12:50:14 +00:00
|
|
|
Whenever {project_name} has to send out an email, it uses templates defined in this theme to craft the email.
|
2016-05-13 19:49:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-28 12:50:14 +00:00
|
|
|
The link:{developerguide_link}[{developerguide_name}] goes into how to create a new themes or modify existing ones.
|
2016-05-14 14:48:22 +00:00
|
|
|
|
|
|
|
==== Internationalization
|
|
|
|
|
2017-08-28 12:50:14 +00:00
|
|
|
Every UI screen is internationalized in {project_name}. The default language is English, but if you turn on the
|
2016-05-14 14:48:22 +00:00
|
|
|
`Internationalization` switch on the `Theme` tab you can choose which locales you want to support and what the default locale
|
|
|
|
will be. The next time a user logs in, they will be able to choose a language on the login page to use for the login screens,
|
2017-08-28 12:50:14 +00:00
|
|
|
User Account Management UI, and Admin Console. The link:{developerguide_link}[{developerguide_name}] explains
|
2016-06-01 08:49:54 +00:00
|
|
|
how you can offer additional languages.
|
2020-02-10 10:38:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
[[_user_locale_selection]]
|
|
|
|
===== User Locale selection
|
|
|
|
|
|
|
|
In order to select the best possible locale for a user there is a locale selector provider that handles deciding what
|
|
|
|
is the best locale on the information available. One thing to note here is that it is not always known who the user is.
|
|
|
|
For this reason the previously authenticated users locale is remembered in a persisted cookie.
|
|
|
|
|
|
|
|
The logic for selecting the locale uses the first of the following that is available:
|
|
|
|
|
|
|
|
* User selected - when the user has selected a locale using the drop-down locale selector
|
|
|
|
* User profile - when there is an authenticated user and the user has a preferred locale set
|
|
|
|
* Client selected - passed by the client using for example ui_locales parameter
|
|
|
|
* Cookie - last locale selected on the browser
|
|
|
|
* Accepted language - locale from `Accept-Language` header
|
|
|
|
* Realm default
|
|
|
|
* If none of the above, fallback to English
|
|
|
|
|
|
|
|
When a user is authenticated an action is triggered to update the locale in the persisted cookie mentioned earlier. If the
|
|
|
|
user has actively switched the locale through the locale selector on the login pages the users locale is also updated at
|
|
|
|
this point.
|