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โ
| Language | Code | File | Status |
|---|---|---|---|
| ๐ฌ๐ง English | en | messages_en.properties | โ Complete |
| ๐น๐ท Turkish | tr | messages_tr.properties | โ Complete |
| ๐ซ๐ท French | fr | messages_fr.properties | โ Complete |
| ๐ฎ๐น Italian | it | messages_it.properties | โ Complete |
| ๐ช๐ธ Spanish | es | messages_es.properties | โ Complete |
| ๐ฉ๐ฐ Danish | da | messages_da.properties | โ Complete |
| ๐ฉ๐ช German | de | messages_de.properties | โ Complete |
| ๐ท๐บ Russian | ru | messages_ru.properties | โ Complete |
| ๐ฆ๐ฟ Azerbaijani | az | messages_az.properties | โ Complete |
| ๐ธ๐ฆ Arabic | ar | messages_ar.properties | โ Complete |
| ๐น๐ผ Chinese (Trad.) | zh_TW | messages_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:
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.
| Key | Description | Placeholders |
|---|---|---|
resendCode | Button label to request a new OTP code | โ |
emailOtpForm | Instruction shown above the OTP input field | {0} = code length (e.g. 6) |
email-authenticator-display-name | Name shown in Keycloak's authenticator picker | โ |
email-authenticator-help-text | Short description shown below the display name | โ |
email-authenticator-resend-cooldown | Message shown while the resend cooldown is active | {0} = remaining seconds |
email-authenticator-too-many-attempts | Error 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).
| Key | Description | Placeholders |
|---|---|---|
requiredAction.email-authenticator-setup | Label for the required action in Keycloak admin | โ |
email-authenticator-setup-title | Page title of the setup screen | โ |
email-authenticator-setup-description | Explanation shown on the setup screen | โ |
email-authenticator-setup-button | Confirm button on the setup screen | โ |
email-authenticator-setup-cancelled | Message when a user tries to cancel a required setup | โ |
email-authenticator-setup-error | Generic setup failure message | โ |
email-authenticator-setup-missing-email | Shown when the user account has no email address | โ |
email-authenticator-setup-verify-title | Title of the email verification step during setup | โ |
email-authenticator-setup-verify-description | Instructions on the verification step | โ |
email-authenticator-setup-verify-button | Submit button on the verification step | โ |
email-authenticator-setup-send-error | Shown when the verification email fails to send | โ |
email-authenticator-setup-code-expired | Shown when the setup verification code has expired | โ |
email-authenticator-setup-code-invalid | Shown when the entered code is wrong | โ |
email-authenticator-setup-code-missing | Shown when the user submits without entering a code | โ |
email-authenticator-setup-too-many-attempts | Shown after too many wrong attempts during setup | โ |
Email Messagesโ
These control the subject line and body of the OTP email itself.
| Key | Description | Placeholders |
|---|---|---|
emailCodeSubject | Email subject line | {0} = OTP code |
emailCodeBody | Plain-text email body | {0} = OTP code, {1} = TTL in seconds |
emailCodeBodyHtml | HTML email body (used when HTML sending is enabled) | {0} = OTP code, {1} = TTL in seconds |
Full English Referenceโ
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.
:::