/**
* @see org.apache.pluto.om.common.LanguageSet#get(java.util.Locale)
*/
public Language get(Locale locale)
{
Language fallBack = null;
Iterator searchItr = innerCollection.iterator();
while (searchItr.hasNext())
{
Language lang = (Language) searchItr.next();
if (lang.getLocale().equals(locale))
{
if (resources != null)
{
return createLanguage(
lang.getLocale(),
loadResourceBundle(lang.getLocale()),
lang.getTitle(),
lang.getShortTitle(),
StringUtils.join(lang.getKeywords(), ","));
}
else
{
return lang;
}
}
else if (lang.getLocale().getLanguage().equals(locale.getLanguage()))
{
fallBack = lang;
}
}