Class ClientLocalizationManager
- java.lang.Object
-
- com.inductiveautomation.ignition.client.model.ClientLocalizationManager
-
- All Implemented Interfaces:
TranslationPackage,java.io.Serializable
- Direct Known Subclasses:
ClientLocalizationManagerImpl,DesignerLocalizationManager
public abstract class ClientLocalizationManager extends java.lang.Object implements TranslationPackage
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static ClientLocalizationManager_instancestatic java.lang.StringEVENT_AVAILABLE_LOCALESstatic java.lang.StringEVENT_TRANSLATIONS
-
Constructor Summary
Constructors Modifier Constructor Description protectedClientLocalizationManager()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddLocaleListener(LocaleListener listener)voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)protected voidfireProperty(java.lang.String name)static <T extends ClientLocalizationManager>
Tget()abstract java.lang.Stringget(java.util.Locale locale, java.lang.String key)abstract java.util.Collection<java.util.Locale>getAvailableLocales()abstract java.util.LocalegetCurrentLocale()abstract java.util.LocalegetPreviewLocale()abstract java.lang.StringgetStrict(java.lang.String key)abstract java.lang.StringgetStrict(java.util.Locale locale, java.lang.String key)abstract java.lang.StringgetString(java.lang.String key)abstract java.lang.StringgetStringForBundleKey(java.lang.String bundlekey)abstract TranslationMapgetTranslationsFor(java.lang.String key)abstract booleanisTranslationEnabled()abstract voidremoveLocaleListener(LocaleListener listener)voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)abstract voidresetLocale()Resets the current locale to the base locale.protected static voidset(ClientLocalizationManager mgr)abstract voidsetCurrentLocale(java.util.Locale locale)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.i18n.translation.TranslationPackage
createDiff, getAllTranslations, getAvailableKeys, getBaseLocale, getKeyHashRule, isDefined, isDefined
-
-
-
-
Field Detail
-
EVENT_AVAILABLE_LOCALES
public static final java.lang.String EVENT_AVAILABLE_LOCALES
- See Also:
- Constant Field Values
-
EVENT_TRANSLATIONS
public static final java.lang.String EVENT_TRANSLATIONS
- See Also:
- Constant Field Values
-
_instance
protected static ClientLocalizationManager _instance
-
-
Method Detail
-
get
public static <T extends ClientLocalizationManager> T get()
-
set
protected static void set(ClientLocalizationManager mgr)
-
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:
getAvailableLocalesin interfaceTranslationPackage- 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:
getin interfaceTranslationPackagekey- 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:
getStrictin interfaceTranslationPackage- Parameters:
locale- the locale to find a value forkey- 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)
-
getTranslationsFor
public abstract TranslationMap getTranslationsFor(java.lang.String key)
- Specified by:
getTranslationsForin interfaceTranslationPackage- Returns:
- a map of all of the translations available for a given key.
-
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. *
-
-