From the code, it looks like locale.supported will return a
List<Locale>. This is not the regular java object Locale. It is
another version of Locale that only can return label and url. However,
the url will have an attribute kc_locale=<language code>. So you could
parse the url and extract the language code.
BTW, I agree with you. For the next version of the account management
console the language code should be much easier to get.
On 4/20/2018 7:46 AM, Adrien DESBIAUX wrote:
Hello!
I would like to be sure to understand well how internationalization works in KC:
I can only access those 2 variables in the template:
- locale.supported
and
- locale.current
https://github.com/keycloak/keycloak/blob/master/services/src/main/java/o...
My issue is that ${locale.current} return the "language name" as a string.
But it would be very helpful to get the language code instead or another property to get
for example "de" for Deutsch. That would make internationalization logics more
standard to other tools.
Would you agree or did I miss something?
Thank you in advance for your feedback.
Keycloak is still an awesome tool :)
Cheers!
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev