logger.warn("Error while getting portal locale.");
portalLocale = MessageBuilder.getBrowserLocaleFromSpago();
logger.debug("Spago locale: " + portalLocale);
}
SourceBean languageSB = null;
if(portalLocale != null && portalLocale.getLanguage() != null) {
languageSB = (SourceBean)config.getFilteredSourceBeanAttribute("SPAGOBI.LANGUAGE_SUPPORTED.LANGUAGE",
"language", portalLocale.getLanguage());
}
if(languageSB != null) {
map.put("country", (String)languageSB.getAttribute("country"));
map.put("language", (String)languageSB.getAttribute("language"));
logger.debug("Added parameter: country/" + (String)languageSB.getAttribute("country"));
logger.debug("Added parameter: language/" + (String)languageSB.getAttribute("language"));
} else {
logger.warn("Language " + portalLocale.getLanguage() + " is not supported by SpagoBI");
logger.warn("Portal locale will be replaced with the default lacale (country: US; language: en).");
map.put("country", "US");
map.put("language", "en");