Package org.apache.pluto.om.common

Examples of org.apache.pluto.om.common.Language


            Locale locale = (Locale)iter.next();
            ResourceBundle bundle = null;
            bundle = loadResourceBundle(locale);
            if (bundle != null)
            {
                Language language = createLanguage(locale, bundle);
                remove(language);
                add(language);
            }
        }
    }
View Full Code Here


            locale = matchLocale(locale);
        }

        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            Language language = (Language)iterator.next();
            if (language.getLocale().equals(locale) || size()==1) {
                return language;
            }
        }

        return null;
View Full Code Here

                    keywords=bundle.getString("javax.portlet.keywords");
                } catch(MissingResourceException x) {
                    keywords = this.castorKeywords;
                }*/

                Language language = createLanguage(locale, bundle);
                remove(language);
                add(language);
            }
        }
    }
View Full Code Here

        }

        Iterator iterator = this.iterator();
        while (iterator.hasNext())
        {
            Language language = (Language)iterator.next();
            if (language.getLocale().equals(locale) || size()==1)
            {
                return language;
            }
        }
View Full Code Here

                    keywords=bundle.getString("javax.portlet.keywords");
                } catch(MissingResourceException x) {
                    keywords = this.castorKeywords;
                }*/

                Language language = createLanguage(locale, bundle);
                remove(language);
                add(language);
            }
        }
    }
View Full Code Here

        // 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();
View Full Code Here

        // 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();
View Full Code Here

      }
    }

    PortletDefinition portletDefinition = portletWindow.getPortletEntity().getPortletDefinition();
    LanguageSet languageSet = portletDefinition.getLanguageSet();
    Language lang = languageSet.get(request.getLocale());
    String title = lang != null ? lang.getTitle() : "no title available";

    // create a PortletInfo object. This is used to communicate with
    // the header and footer JSP pages for this portlet
    PortletInfo portletInfo = new PortletInfo();
   
View Full Code Here

    public ResourceBundle getResourceBundle(Locale locale)
    {
        LanguageSet languageSet = portletDefinition.getLanguageSet();
       
        Language lang = languageSet.get(locale);
                                                                               
        if (lang == null)
        {
            Locale defaultLocale = languageSet.getDefaultLocale();
            lang = languageSet.get(defaultLocale);
        }
       
        return lang.getResourceBundle();
    }
View Full Code Here

    {
        HashSet localSet = new HashSet();
        Iterator itr = innerCollection.iterator();
        while (itr.hasNext())
        {
            Language lang = (Language) itr.next();
            localSet.add(lang.getLocale());
        }

        return localSet.iterator();
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.common.Language

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.