// Language language = (Language) languageMap.get(portlet);
// if(language != null)
// {
// return language;
// }
LanguageSet languageSet = portlet.getLanguageSet();
Language language = languageSet.get(locale);
Enumeration locales = request.getLocales();
while (locales.hasMoreElements() && language == null)
{
Locale aLocale = (Locale) locales.nextElement();
language = languageSet.get(aLocale);
}
Iterator langItr = languageSet.iterator();
if (langItr.hasNext() && language == null)
{
language = (Language) langItr.next();
}
if (language == null)
{
language = languageSet.get(languageSet.getDefaultLocale());
}
if (language == null)
{
MutableLanguage languageCtl = new LanguageImpl();