Version 4

    Assuming you have a Portlet descriptor looking like :

     

    <portlet>    ...    <supported-locale>en</supported-locale>    <supported-locale>fr</supported-locale>    <resource-bundle>Resource</resource-bundle>    ... </portlet>

     

    During the request you can determine the available bundle with the code :

     

    Set availableBundles = new HashSet(); Locale{FOOTNOTE DEF  } locales = Locale.getAvailableLocales(); for (int i = 0; i < locales.length; i++) {    Locale locale = locales[I|i];    ResourceBundle bundle = getPortletConfig().getResourceBundle(locale);    if (bundle.getLocale().equals(locale))    {       availableBundles.add(bundle);    } }

     

     

    Referenced by: