Skip to main content

Localization

The authenticator ships with 11 built-in translations. You can customize any message or add a new language by editing properties files โ€” no code changes required.

Supported Languagesโ€‹

LanguageCodeFileStatus
๐Ÿ‡ฌ๐Ÿ‡ง Englishenmessages_en.propertiesโœ… Complete
๐Ÿ‡น๐Ÿ‡ท Turkishtrmessages_tr.propertiesโœ… Complete
๐Ÿ‡ซ๐Ÿ‡ท Frenchfrmessages_fr.propertiesโœ… Complete
๐Ÿ‡ฎ๐Ÿ‡น Italianitmessages_it.propertiesโœ… Complete
๐Ÿ‡ช๐Ÿ‡ธ Spanishesmessages_es.propertiesโœ… Complete
๐Ÿ‡ฉ๐Ÿ‡ฐ Danishdamessages_da.propertiesโœ… Complete
๐Ÿ‡ฉ๐Ÿ‡ช Germandemessages_de.propertiesโœ… Complete
๐Ÿ‡ท๐Ÿ‡บ Russianrumessages_ru.propertiesโœ… Complete
๐Ÿ‡ฆ๐Ÿ‡ฟ Azerbaijaniazmessages_az.propertiesโœ… Complete
๐Ÿ‡ธ๐Ÿ‡ฆ Arabicarmessages_ar.propertiesโœ… Complete
๐Ÿ‡น๐Ÿ‡ผ Chinese (Trad.)zh_TWmessages_zh_TW.propertiesโœ… Complete

All files live in:

src/main/resources/theme-resources/messages/

How to Add a New Languageโ€‹

1. Copy the English fileโ€‹

cd src/main/resources/theme-resources/messages/
cp messages_en.properties messages_<code>.properties

Replace <code> with the ISO 639-1 language code (e.g. ja for Japanese, pt for Portuguese, ko for Korean).

2. Translate the valuesโ€‹

Open the new file and translate every value while keeping the keys unchanged:

messages_ja.properties โ€” example
resendCode=ใ‚ณใƒผใƒ‰ใ‚’ๅ†้€ไฟก
emailOtpForm=ใƒกใƒผใƒซใซ้€ไฟกใ•ใ‚ŒใŸ {0} ๆกใฎใ‚ณใƒผใƒ‰ใ‚’ๅ…ฅๅŠ›ใ—ใฆใใ ใ•ใ„ใ€‚

emailCodeSubject={0} ใ‚ขใ‚ฏใ‚ปใ‚นใ‚ณใƒผใƒ‰
emailCodeBody=ใ‚ขใ‚ฏใ‚ปใ‚นใ‚ณใƒผใƒ‰: {0}ใ€‚\n\nใ“ใฎใ‚ณใƒผใƒ‰ใฏ {1} ็ง’ไปฅๅ†…ใซๆœŸ้™ๅˆ‡ใ‚Œใซใชใ‚Šใพใ™ใ€‚

:::warning Keep placeholders untouched Text inside curly braces โ€” {0}, {1} โ€” are runtime placeholders for the OTP code and expiry time. Do not translate them. :::

3. Build and testโ€‹

mvn clean package

Deploy the JAR, then in Keycloak switch the realm locale (or your browser language) to your new language and go through a login to verify all messages display correctly.

4. Submit a Pull Requestโ€‹

We welcome new translations! Follow the Contributing guide to open a PR. Include the new properties file and a note about which Keycloak locale code you used.


Translation Keys Referenceโ€‹

All keys used by the authenticator, with descriptions and placeholders.

UI Messagesโ€‹

These appear on the Keycloak login page and OTP entry form.

KeyDescriptionPlaceholders
resendCodeButton label to request a new OTP codeโ€”
emailOtpFormInstruction shown above the OTP input field{0} = code length (e.g. 6)
email-authenticator-display-nameName shown in Keycloak's authenticator pickerโ€”
email-authenticator-help-textShort description shown below the display nameโ€”
email-authenticator-resend-cooldownMessage shown while the resend cooldown is active{0} = remaining seconds
email-authenticator-too-many-attemptsError shown after too many wrong attemptsโ€”

Setup / Enrollment Messagesโ€‹

These appear during the optional authenticator enrollment flow (when a user sets up email 2FA for the first time).

KeyDescriptionPlaceholders
requiredAction.email-authenticator-setupLabel for the required action in Keycloak adminโ€”
email-authenticator-setup-titlePage title of the setup screenโ€”
email-authenticator-setup-descriptionExplanation shown on the setup screenโ€”
email-authenticator-setup-buttonConfirm button on the setup screenโ€”
email-authenticator-setup-cancelledMessage when a user tries to cancel a required setupโ€”
email-authenticator-setup-errorGeneric setup failure messageโ€”
email-authenticator-setup-missing-emailShown when the user account has no email addressโ€”
email-authenticator-setup-verify-titleTitle of the email verification step during setupโ€”
email-authenticator-setup-verify-descriptionInstructions on the verification stepโ€”
email-authenticator-setup-verify-buttonSubmit button on the verification stepโ€”
email-authenticator-setup-send-errorShown when the verification email fails to sendโ€”
email-authenticator-setup-code-expiredShown when the setup verification code has expiredโ€”
email-authenticator-setup-code-invalidShown when the entered code is wrongโ€”
email-authenticator-setup-code-missingShown when the user submits without entering a codeโ€”
email-authenticator-setup-too-many-attemptsShown after too many wrong attempts during setupโ€”

Email Messagesโ€‹

These control the subject line and body of the OTP email itself.

KeyDescriptionPlaceholders
emailCodeSubjectEmail subject line{0} = OTP code
emailCodeBodyPlain-text email body{0} = OTP code, {1} = TTL in seconds
emailCodeBodyHtmlHTML email body (used when HTML sending is enabled){0} = OTP code, {1} = TTL in seconds

Full English Referenceโ€‹

messages_en.properties
resendCode=Resend Code
emailOtpForm=Please enter the {0} digit code that was delivered to your email.

emailCodeSubject={0} access code
emailCodeBody=Access code: {0}.\n\nThis code will expire within {1} seconds.
emailCodeBodyHtml=<p>Access code: <strong>{0}</strong>.</p><p>This code will expire within <strong>{1}</strong> seconds.</p>

email-authenticator-display-name=Email Authenticator
email-authenticator-help-text=Receive a one-time verification code by email.
requiredAction.email-authenticator-setup=Set up Email Authenticator
email-authenticator-setup-title=Set up Email Authenticator
email-authenticator-setup-description=Use this option to receive one-time verification codes via email during sign-in.
email-authenticator-setup-button=Enable Email Authenticator
email-authenticator-setup-cancelled=Email authenticator setup cannot be cancelled.
email-authenticator-setup-error=We couldn''t enable Email Authenticator. Try again or contact support.
email-authenticator-setup-missing-email=Add an email address to your account before enabling Email Authenticator.
email-authenticator-resend-cooldown=Please wait {0} seconds before requesting a new code.
email-authenticator-setup-verify-title=Verify your email
email-authenticator-setup-verify-description=Enter the verification code sent to your email address.
email-authenticator-setup-verify-button=Verify
email-authenticator-setup-send-error=Failed to send verification email. Please try again.
email-authenticator-setup-code-expired=The verification code has expired. Please request a new one.
email-authenticator-setup-code-invalid=The verification code is incorrect. Please try again.
email-authenticator-setup-code-missing=Please enter the verification code.
email-authenticator-setup-too-many-attempts=Too many incorrect attempts. Please request a new code.
email-authenticator-too-many-attempts=Too many incorrect attempts. Please request a new code.

:::tip Single quotes in properties files Notice couldn''t โ€” properties files require single quotes to be escaped by doubling them (''). Keep this in mind when translating strings that contain apostrophes. :::