Set<Locale> supportedLocales = new HashSet<Locale>();
final TranslationService translationService = TemplateUtil.getTranslationService();
final Collection<String> locales = translationService.getSupportedLocales();
for (String localeKey : locales) {
localeKey = localeKey == null ? DEFAULT : localeKey;
supportedLocales.add(new Locale(localeKey, translationService.getTranslation(localeKey)));
}
return supportedLocales;
}