예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }