public void setDescription(Locale locale, String description) { String languageId = LocaleUtil.toLanguageId(locale); if (Validator.isNotNull(description)) { setDescription( LocalizationUtil.updateLocalization( getDescription(), "Description", description, languageId)); } else { setDescription( LocalizationUtil.removeLocalization(getDescription(), "Description", languageId)); } }
public void setDescriptionMap(Map<Locale, String> descriptionMap, Locale defaultLocale) { if (descriptionMap == null) { return; } Locale[] locales = LanguageUtil.getAvailableLocales(); for (Locale locale : locales) { String description = descriptionMap.get(locale); setDescription(description, locale, defaultLocale); } }
public void setDescription(String description, Locale locale) { setDescription(description, locale, LocaleUtil.getDefault()); }