localeCtx.setSessionLocale(LocalizationLifecycle.getSessionLocale(req));
localeCtx.setUserProfileLocale(getUserProfileLocale(container, req.getRemoteUser()));
localeCtx.setRemoteUser(req.getRemoteUser());
localeCtx.setPortalLocale(checkPortalLocaleSupported(portalLocale, supportedLocales));
Locale locale = localePolicy.determineLocale(localeCtx);
boolean supported = supportedLocales.contains(locale);
if (!supported && !"".equals(locale.getCountry())) {
locale = new Locale(locale.getLanguage());
supported = supportedLocales.contains(locale);