Class ClientLocalizationManager

    • Constructor Detail

      • ClientLocalizationManager

        protected ClientLocalizationManager()
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.String propertyName,
                                              java.beans.PropertyChangeListener listener)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.String propertyName,
                                                 java.beans.PropertyChangeListener listener)
      • fireProperty

        protected void fireProperty​(java.lang.String name)
      • isTranslationEnabled

        public abstract boolean isTranslationEnabled()
      • getAvailableLocales

        public abstract java.util.Collection<java.util.Locale> getAvailableLocales()
        Specified by:
        getAvailableLocales in interface TranslationPackage
        Returns:
        the locales for which translations are available. This will include the base locale.
      • get

        public abstract java.lang.String get​(java.util.Locale locale,
                                             java.lang.String key)
        Specified by:
        get in interface TranslationPackage
        key - the key to find a match for, or return value if no value found
        Returns:
        the translation of the key for the requested locale, or the key, if the translation is not available.
      • getString

        public abstract java.lang.String getString​(java.lang.String key)
      • getStrict

        public abstract java.lang.String getStrict​(java.lang.String key)
      • getStrict

        public abstract java.lang.String getStrict​(java.util.Locale locale,
                                                   java.lang.String key)
        Specified by:
        getStrict in interface TranslationPackage
        Parameters:
        locale - the locale to find a value for
        key - the key to find a match for
        Returns:
        the translation, or null if the translation doesn't exist.
      • getStringForBundleKey

        public abstract java.lang.String getStringForBundleKey​(java.lang.String bundlekey)
      • getCurrentLocale

        public abstract java.util.Locale getCurrentLocale()
      • setCurrentLocale

        public abstract void setCurrentLocale​(java.util.Locale locale)
      • getPreviewLocale

        public abstract java.util.Locale getPreviewLocale()
      • addLocaleListener

        public abstract void addLocaleListener​(LocaleListener listener)
      • removeLocaleListener

        public abstract void removeLocaleListener​(LocaleListener listener)
      • resetLocale

        public abstract void resetLocale()
        Resets the current locale to the base locale. *