public String getKeywords(String lang) { String keywords = getKeywords().get(I18NHelper.checkLanguage(lang)); if (!StringUtil.isDefined(keywords)) { Set<String> languages = I18NHelper.getAllSupportedLanguages(); for (String language : languages) { keywords = getKeywords().get(language); if (StringUtil.isDefined(keywords)) { return keywords; } } } return keywords; }
public String getPreview(String lang) { String preview = getPreviews().get(I18NHelper.checkLanguage(lang)); if (!StringUtil.isDefined(preview)) { Set<String> languages = I18NHelper.getAllSupportedLanguages(); for (String language : languages) { preview = getPreviews().get(language); if (StringUtil.isDefined(preview)) { return preview; } } } return preview; }
public String getTitle(String lang) { String title = getTitles().get(I18NHelper.checkLanguage(lang)); if (!StringUtil.isDefined(title)) { Set<String> languages = I18NHelper.getAllSupportedLanguages(); for (String language : languages) { title = getTitles().get(language); if (StringUtil.isDefined(title)) { return title; } } } return title; }