Hi,
we build a larger system where Camunda Cockpit is just a part of. We offer our users global language settings applying to all apps. The settings are stored in a separate microservice and should be applied to Camunda Cockpit as well. I added the translations for Camunda Cockpit and it works fine when changing browser language. But now I need to get the locale from my custom microservice.
Is there a possibility to tell Camunda WebApps explicitely which language to use?
We use the Spring Boot Starter and I thought of writing a custom LocaleResolver.
I tried as a proof a concept a LocaleResolver which always resolves to German:
public class CustomLocaleResolver extends SessionLocaleResolver {
@Override
public Locale resolveLocale(HttpServletRequest request) {
// resolve by calling microservice
return Locale.GERMAN;
}
}
and of course I register it:
@Bean
public LocaleResolver localeResolver() {
CustomLocaleResolver localeResolver = new CustomLocaleResolver();
return localeResolver;
}
However, Camunda Cockpit always shows up in the browser language.
What else is necessary to tell Camunda Cockpit the desired locale?