question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Theme translation messages support

See original GitHub issue

I would like to add translation files to the theme.

Expected behaviour

Keycloak documentation on internationalization states that in order to support a custom language two steps are neccessary:

  1. create a messages* file inside the theme folder
  2. modify theme.properties by adding the locales= ... entry

Actual state

(1) Messages

I was investigating if translations are already supported. AFAIK the build theme script generateKeycloakThemeResources.js only copies the resources folder to the theme folder. The messages folder is not mentioned in the script.

To be clear what I was looking for: Keycloak expects the messages folder next to the resources folder.

    META-INF/keycloak-themes.json
    theme/mytheme/login/theme.properties
    theme/mytheme/login/login.ftl
    theme/mytheme/login/resources/css/styles.css
    theme/mytheme/login/resources/img/image.png
    theme/mytheme/login/messages/messages_en.properties
    theme/mytheme/email/messages/messages_en.properties

Maybe I am missing something here, so any help regarding adding translation files would be much appreciated.

A workaround would be to add the messages folder to the theme by updating a jar package once it is compiled, but that is not a permanent solution.

(2) Modify theme.properties

I think this pull-request solves it: https://github.com/InseeFrLab/keycloakify/pull/18

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
garronejcommented, Sep 5, 2022

There is now a proper i18n API in Keycloakify v6 ( 6.0.0-beta.13) 🥳

https://docs.keycloakify.dev/v/v6/i18n

2reactions
garronejcommented, Aug 5, 2022

Hi @loki344,
Keycloak v6 is just around the corner (actually it’s even released in beta) and features an actual support for i18n customisation along side with significant optimisations on the bundle size.

It’s not fully documented yet but https://github.com/garronej/keycloakify-demo-app-css-only https://docs.keycloakify.dev/v/v6/

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I translate the theme? - Dream-Theme Support Portal
Install the plugin and go to Loco Translate -> Themes to add a new language or edit an existing one: Fig. 1. Translate...
Read more >
Localizing a theme - Lotus Themes Help Center - Zendesk
Our themes fully support Zendesk's multilingual feature. ... This feature allows you to put text translations into different languages in named placeholders ...
Read more >
Theme translation - XTemos Studio
Click on the “Export” button and download the “. · Then select “Machine Object Message Catalog (. · Go to your WordPress Dashboard...
Read more >
How Do I Translate WooCommerce Messages?
This article will walk you through the process step-by-step and show you how to use WPML or a theme with built-in translation support...
Read more >
Types of Messages – Translate WordPress
You can help translate WordPress to your language by logging in to the translation platform with your WordPress.org account and suggesting ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found