How to Localize Keycloak Login for French and German Users

Guilliano MolaireGuilliano Molaire6 min read

To localize Keycloak login for French and German users, open Realm settings, then Localization, turn on Internationalization and add French (fr) and German (de) as supported locales, as the Keycloak admin guide describes. Then send ui_locales=fr or ui_locales=de on the OpenID Connect (OIDC) authorization request, so the login page opens in that language, and change individual strings with realm overrides or with messages_fr.properties and messages_de.properties files in a custom theme.

This walkthrough follows Keycloak 26.8.2 and checks each behavior against its source code, so menu names may differ slightly on other releases.

Prerequisites

  • A Keycloak realm with an OIDC client for your application.
  • An admin account that can change the realm’s settings.
  • An application that starts login with an authorization request, either by building the URL itself or through a library such as keycloak-js or oidc-client-ts.
  • A test user, so that you can sign in and check each language.

Step 1: Turn on internationalization and add French and German

Open Realm settings and choose the Localization tab. Turn on Internationalization, add French and German as supported locales, and pick a default locale, the language Keycloak falls back to when nothing else matches. The admin guide says that from then on a user “can choose a language on the login page to use for the login screens, Account Console, and Admin Console.”

You do not need to translate the default text yourself: the Keycloak source has a French messages_fr.properties and a German messages_de.properties for the login theme. While internationalization is off, the locale selector returns English whatever the request asks for.

Step 2: Send ui_locales from your app

ui_locales is a standard parameter of the OIDC authorization request, which the specification defines as the “End-User’s preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 language tag values, ordered by preference”.:

https://your-keycloak-host/realms/your-realm/protocol/openid-connect/auth
  ?client_id=my-app
  &response_type=code
  &scope=openid
  &redirect_uri=https%3A%2F%2Fapp.example.com%2Fcallback
  &ui_locales=fr

In a single-page application (SPA) with keycloak-js, the code that builds the login URL adds ui_locales from a locale option (params.append('ui_locales', options.locale)), so pass locale to login():

// Use the language your app already shows
const lang = document.documentElement.lang.startsWith("de") ? "de" : "fr";
await keycloak.login({ locale: lang });

With oidc-client-ts, the ExtraSigninRequestArgs type lists ui_locales, so you can pass it to a redirect:

await userManager.signinRedirect({ ui_locales: "de fr" });

Keycloak also reads its own kc_locale parameter. Its value must equal a supported locale exactly, and when it does, Keycloak writes the KEYCLOAK_LOCALE cookie. ui_locales takes a list and matches fr-CA to a supported fr, so send ui_locales from applications and keep kc_locale for forcing a language while testing.

How Keycloak picks the language

The default locale selector checks these sources in order and uses the first one that names a supported locale, which matches the list in the admin guide:

  1. The language the user picked in the login page menu during this login.
  2. The locale attribute on the user’s profile, once Keycloak knows who the user is.
  3. The ui_locales your client sent.
  4. The KEYCLOAK_LOCALE cookie, the last locale chosen in that browser.
  5. The browser’s Accept-Language header.
  6. The realm’s default locale, and English if no default is set.

How Keycloak picks the login language: the first of six sources that names a supported locale wins

With no menu choice and no known user yet, the app’s ui_locales=fr de decides.

Once Keycloak knows the user, a profile locale of en takes priority over the fr your app sent.

Step 3: Change individual strings in French and German

Realm overrides let you add a message key with your own text for French or German. The admin console’s help text says “These translations will override any translation specified by a theme.” Our post on changing the username label on the Keycloak login page walks through one override in detail.

Theme message files suit larger changes that you want in version control. The theme guide shows message files such as theme/mytheme/login/messages/messages_en.properties, and the same folder takes French and German files:

# login/theme.properties
parent=keycloak.v2
locales=en,fr,de

# login/messages/messages_fr.properties
loginAccountTitle=Connexion à l''espace client

# login/messages/messages_de.properties
loginAccountTitle=Im Kundenbereich anmelden

French needs one detail that German rarely does. Keycloak’s message method passes each message to new MessageFormat(value, locale), and the MessageFormat documentation says a single quote “must be represented by doubled single quotes”, so write l''espace, as in Nom d''utilisateur ou courriel in Keycloak’s French login file.

When a key is missing in German, Keycloak walks a chain of parent locales, from de-CH to de, then to the realm’s default locale when that is another language, and finally to English. For a key found in no file, the message method falls back to the key itself (messages.getOrDefault(key, key)), so a key name on the page usually means a typo.

Somewhere to run this that stays patched

Everything above works the same on Skycloak, because it is real upstream Keycloak rather than a fork. What changes is who handles the upgrades, backups and security patches afterwards.

Step 4: Cover emails, the account console and required actions

The update password screen is login-update-password.ftl in the login theme folder, so it uses the login messages, and the account theme has its own messages_fr.properties and messages_de.properties. For emails, the template provider calls resolveLocale(user, ...), so set locale to fr or de on users you create through the Admin API or an import. Our Keycloak email configuration guide covers the SMTP side.

Test it

Open a private browser window, so that no KEYCLOAK_LOCALE cookie or session is reused, and start a login from your app with ui_locales=fr. The title should read “Connectez-vous à votre compte”, from loginAccountTitle in the French file. Repeat with ui_locales=de in a new private window and expect “Bei Ihrem Konto anmelden”, from the German file. Then trigger a password reset for a test user whose locale attribute is de and check that the email arrives in German.

Troubleshooting

The page stays in English whatever you send. Internationalization is off, or fr and de are not in the supported locales.

ui_locales is ignored for one user. That user has a locale attribute or picked a language from the menu. Check the attribute under Users and test in a fresh private window.

kc_locale=fr-CA does nothing. kc_locale must equal a supported locale exactly. Use fr, or send ui_locales=fr-CA, which matches fr.

FAQ

What is the difference between ui_locales and kc_locale in Keycloak?

ui_locales is the OIDC standard parameter your app sends; it takes a list and matches fr-CA to fr. kc_locale is Keycloak’s own parameter; it needs an exact supported value and sets the KEYCLOAK_LOCALE cookie.

Why does Keycloak show English when the browser is set to French?

Accept-Language comes fifth in the selection order. A user locale attribute, a cookie from an earlier choice, or a ui_locales value takes priority, and the header only counts when French is a supported locale.

Can I localize the Keycloak login page in the Skycloak dashboard?

Yes. On the Launch plan or higher, the dashboard lets you set login page text per language, including French and German, and our internationalization guide explains how. For full theme files with your own messages_fr and messages_de bundles, the Theme Library accepts ZIP themes and Keycloakify JARs on the Business plan and up, as described in our Keycloakify post.

Next steps

Turn on French and German in your realm, send ui_locales from your app, and check the login page in a private window for each language. These are useful next:

Our own docs now have their navigation and interface labels in French and German, at /docs/fr/ and /docs/de/.

The Skycloak documentation home page in French, with the navigation and interface labels translated

If you would rather not run the Keycloak server yourself, you can try managed Keycloak hosting on Skycloak.

Somewhere to run this that stays patched

Everything above works the same on Skycloak, because it is real upstream Keycloak rather than a fork. What changes is who handles the upgrades, backups and security patches afterwards.

Guilliano Molaire
Written by
Founder, Skycloak

Guilliano is the founder of Skycloak and a cloud infrastructure specialist with deep expertise in product development and scaling SaaS products. He discovered Keycloak while consulting on enterprise IAM and built Skycloak to make managed Keycloak accessible to teams of every size.

© 2026 Skycloak. All Rights Reserved. Design by Yasser SolimanKeycloak™ is a trademark of the Linux Foundation. Skycloak is not affiliated with the Keycloak project.