Class LocaleWrapper
java.lang.Object
com.inductiveautomation.ignition.common.i18n.LocaleWrapper
- All Implemented Interfaces:
Serializable,Comparable<LocaleWrapper>
A class that represents a locale. It can be created with either a locale object or the lang code,
and to-strings nicely.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLocaleWrapper(@Nullable String langCode) Constructs a new LocaleWrapper from a language code string.LocaleWrapper(Locale locale) Constructs a new LocaleWrapper from aLocale. -
Method Summary
-
Constructor Details
-
LocaleWrapper
Constructs a new LocaleWrapper from aLocale.- Parameters:
locale- The locale to wrap.
-
LocaleWrapper
Constructs a new LocaleWrapper from a language code string. If the code is blank, the default locale is used.- Parameters:
langCode- The language code (e.g., "en", "en_US").
-
-
Method Details
-
getLangCode
- Returns:
- The string representation of the locale (e.g., "en_US").
-
getLocale
- Returns:
- The underlying
Localeobject.
-
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<LocaleWrapper>
-