Search code examples
keycloakkeycloak-services

How to pass keycloak login page language with URL


is it possible to pass language with a login URL?

I know now Keycloak supports multiple languages and after enabling this feature I can use it. Currently, I can only change that language after going to the login page. I want to show the login page with the given language. Is there any way to pass language with the login page URL using a query parameter or header value?

After loading the login page I checked it URL and end of that URL have a query parameter like kc_locale=en. I try to use this query parameter but it not work.


Solution

  • In version 7.0.0+ below format works:

    https://...../auth/realms/..../protocol/openid-connect/auth?client_id=account&redirect_uri=...&state=0&response_type=code&scope=openid&**kc_locale=cs**
    

    For version 13.0.0+ use element ui_locales=cs.