Language language = languages.get(languageCode);
if (language != null)
return language;
for (Locale locale : Locale.getAvailableLocales()) {
if (locale.getISO3Language().equals(languageCode) || locale.getLanguage().equals(languageCode)) {
language = new LanguageImpl(new Locale(locale.getLanguage(), "", ""));
languages.put(languageCode, language);
break;
}
}
if (language == null)