diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java index 51d02014a6..889e1dd7ef 100644 --- a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java @@ -163,6 +163,11 @@ public class AdminConsole { public void setLocale(Locale locale) { this.locale = locale; } + + @JsonProperty(value = "locale") + public String getLocaleLanguageTag() { + return locale != null ? locale.toLanguageTag() : null; + } } /** diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AdminConsoleWhoAmILocaleTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AdminConsoleWhoAmILocaleTest.java index 6c9a1805b6..0d9338b4df 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AdminConsoleWhoAmILocaleTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AdminConsoleWhoAmILocaleTest.java @@ -36,7 +36,7 @@ public class AdminConsoleWhoAmILocaleTest extends AbstractKeycloakTest { private static final String DEFAULT_LOCALE = "en"; private static final String REALM_LOCALE = "no"; private static final String USER_LOCALE = "de"; - private static final String EXTRA_LOCALE = "ru"; + private static final String EXTRA_LOCALE = "zh-CN"; private CloseableHttpClient client;