Adding New Translation Messages Or Changing The Default Ones
At theme level





In the Keycloak Realm configuration



Last updated
Was this helpful?
Was this helpful?
import { i18nBuilder } from "keycloakify/login";
import type { ThemeName } from "../kc.gen";
/** @see: https://docs.keycloakify.dev/i18n */
const { useI18n, ofTypeI18n } = i18nBuilder
.withThemeName<ThemeName>()
.withExtraLanguages({ /* ... */ })
.withCustomTranslations({
en: {
loginAccountTitle: "Log in to your ACME account"
},
// cspell: disable
fr: {
loginAccountTitle: "Connectez-vous a votre compte ACME"
}
// cspell: enable
})
.build();
type I18n = typeof ofTypeI18n;
export { useI18n, type I18n };import { i18nBuilder } from "keycloakify/login";
import type { ThemeName } from "../kc.gen";
/** @see: https://docs.keycloakify.dev/i18n */
const { useI18n, ofTypeI18n } = i18nBuilder
.withThemeName<ThemeName>()
.withExtraLanguages({ /* ... */ })
.withCustomTranslations({
en: {
loginAccountTitle: "Log in to your ACME account",
myCustomMessage: "This is a custom message"
},
// cspell: disable
fr: {
loginAccountTitle: "Connectez-vous a votre compte ACME",
myCustomMessage: "Ceci est un message personnalisé"
}
// cspell: enable
})
.build();
type I18n = typeof ofTypeI18n;
export { useI18n, type I18n };msg("profile.attributes.favourite_pet");