add option for ui_localales query param for proper login page localization #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, we had the request to retrieve the login page based on the current ui culture set on the application using the adapter,
so we add the option in order to set the desired locale for retrieving the login page. By default keycloack wil render the login page localized based on these conditions:
With internationalization enabled, the locale is resolved in the following priority:
So, our issue was, suppose our application was starting with a defined uiCulture, the login page was rendered base on 5(Accept-Language) header, which many times was different from the defined in the application.
All you need, which is optional, is to configure your adapter with this parameter, e.g
Be carefull to have your desired ui culture(based on web.config or whatever) before keycloak initialization.