use of org.cubeengine.i18n.language.DefinitionLoadingException in project core by CubeEngine.
the class I18n method getLanguage.
public Language getLanguage(Locale locale) {
try {
Language language = this.service.getLanguage(locale);
if (language != null) {
this.languageLookupMap.put(language.getName().toLowerCase(language.getLocale()), language);
this.languageLookupMap.put(language.getLocalName().toLowerCase(language.getLocale()), language);
}
return language;
} catch (TranslationLoadingException | DefinitionLoadingException e) {
log.error(e, "Error while getting Language!");
return null;
}
}
Aggregations