p2-inc / keycloak-themes

Themes and theme utilities meant for simple theme customization without deploying a packaged theme
https://phasetwo.io
Other
28 stars 11 forks source link

Add boolean attribute for each supported locale #17

Closed bertrand-chenal closed 8 months ago

bertrand-chenal commented 8 months ago

This small change expose attributes like locale_en, locale_fr, etc in the template attributes for each supported locale. This allows to structure templates like this:

<html>
<body>

{{#locale_en}}... english content...{{/locale_en}}

{{#locale_fr}}... contenu en français...{{/locale_fr}}
</body>
</html>

It should be a viable solution for i18n when the amount of locales stays limited.

FTR this is my first foray in the codebase, I hope it fit the overall philosophy and guidelines of the project.

xgp commented 8 months ago

Thank you @bertrand-chenal !