Keycloak - Current language code in theme

Viewed 793

I would like to output the two letter language code (f.e. en) of the current language in the freemaker template of the login theme.

I already tried ${locale.current}, but this only outputs the name of the current language and not the code.

1 Answers

If you have enabled Internationalization for themes use:

${locale.currentLanguageTag}

${locale.currentLanguageTag} => en

${locale.current} => English

Related