fix: translate backend add log
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m48s

This commit is contained in:
2026-01-16 13:59:12 +01:00
parent 4bf07cc8f8
commit c456fdae8b
3 changed files with 10 additions and 2 deletions

View File

@@ -21,11 +21,15 @@ public class UserInfoProvider implements ContainerRequestFilter {
@Override
public void filter(ContainerRequestContext requestContext) {
System.out.println(requestContext.getHeaders());
List<Locale> acceptableLanguages = requestContext.getAcceptableLanguages();
System.out.println(acceptableLanguages);
Locale selectedLocale = findFirstSupportedLanguage(acceptableLanguages);
if (selectedLocale == null)
selectedLocale = TradService.fallbackLocale;
System.out.println(selectedLocale);
requestContext.setProperty("userLocale", selectedLocale);
}