use of com.developmentontheedge.be5.metadata.model.LocalizationElement in project be5 by DevelopmentOnTheEdge.
the class MetaImpl method getLocalization.
private String getLocalization(Project project, String language, String entity, Predicate<LocalizationElement> accept) {
for (Module module : project.getModulesAndApplication()) {
Localizations localizations = module.getLocalizations();
LanguageLocalizations languageLocalizations = localizations.get(language);
if (languageLocalizations == null)
continue;
EntityLocalizations entityLocalizations = languageLocalizations.get(entity);
if (entityLocalizations == null)
continue;
for (LocalizationElement element : entityLocalizations.elements()) if (accept.test(element))
return element.getValue();
}
return "";
}
Aggregations