Class LcLocale


  • public final class LcLocale
    extends java.lang.Object
    A class to represent any of the locales known to XFA.
    • Constructor Detail

      • LcLocale

        public LcLocale​(java.lang.String locale)
        Instantiates an LcLocale with the given name.
        Parameters:
        locale - an ISO locale name.
    • Method Detail

      • normalize

        public static java.lang.String normalize​(java.lang.String locale)
        Normalizes locale name into xx_XX or xx_Xxxx_XX format.
      • isValid

        public boolean isValid()
        Determines if this object is a valid -- recognized locale.
        Returns:
        boolean true if valid, and false otherwise.
      • isChinese

        public boolean isChinese()
        Determines if this object represents a Chinese locale.
        Returns:
        boolean true if this locale is Chinese.
      • isSimplifiedChinese

        public boolean isSimplifiedChinese()
        Determines if this object represents a Simplified Chinese locale.
        Returns:
        boolean true if this locale is Simplified Chinese.
      • isTraditionalChinese

        public boolean isTraditionalChinese()
        Determines if this object represents a Traditional Chinese locale.
        Returns:
        boolean true if this locale is Traditional Chinese.
      • isJapanese

        public boolean isJapanese()
        Determines if this object represents a Japanese locale.
        Returns:
        boolean true if this locale is Japanese.
      • isKoreanHani

        public boolean isKoreanHani()
        Determines if this object represents a Korean_Hani locale.
        Returns:
        boolean true if this locale is Korean_Hani.
      • isKorean

        public boolean isKorean()
        Determines if this object represents a Korean locale.
        Returns:
        boolean true if this locale is Korean.
      • isThai

        public boolean isThai()
        Determines if this object represents a Thai locale.
        Returns:
        boolean true if this locale is Thai.
      • isBIDI

        public boolean isBIDI()
        Determines if this object represents a locale were text is displayed bidirectionally.
        Returns:
        boolean true if this locale is bi-directional, and false otherwise.
      • isArabic

        public boolean isArabic()
        Determines if this object represents an Arabic locale.
        Returns:
        boolean true if this locale is Arabic.
      • isIdeographic

        public boolean isIdeographic()
        Determines if this object represents a locale were text is ideographic. Useful in classifying characters with ambiguous East Asian width.
        Returns:
        boolean true if this locale uses ideographic text, and false otherwise.
      • needsDictionaryBreaking

        public boolean needsDictionaryBreaking()
        Determines if this object represents a locale were dictionary-based line breaking is needed.
        Returns:
        boolean true if this locale is needs breaks, and false otherwise.
      • getName

        public java.lang.String getName()
        Gets this object's name.
        Returns:
        the name.
      • getIsoName

        public java.lang.String getIsoName()
        Gets this object's ISO name.
        Returns:
        the ISO name.
      • getCharSet

        public java.lang.String getCharSet()
        Gets this object's character set.
        Returns:
        the character set.
      • getDescName

        public java.lang.String getDescName()
        Gets this object's descriptive name.
        Returns:
        the descriptive name.
      • equals

        public boolean equals​(java.lang.Object object)
        Compares the given LcLocale to this.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - the locale to compare with.
        Returns:
        true when the locales compare identically, and false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object. This method is unsupported.
        Overrides:
        hashCode in class java.lang.Object
      • getLocale

        public static java.lang.String getLocale()
        Gets the current locale's iso name.
        Returns:
        the current locale's name.
      • setLocale

        public static void setLocale​(java.lang.String localeName)
        Set the current default locale to the given iso locale.
        Parameters:
        localeName - the new locale's name.
      • reset

        public static void reset()
        Resets LcLocale's runtime map to its internal defaults.
      • update

        public static void update​(java.lang.String sLocale,
                                  java.lang.String sDesc)
        Updates LcLocale's runtime map with the given locale definition.
      • currencySymbol

        public static java.lang.String currencySymbol()
        Gets the current locale's currency symbol.
        Returns:
        the currency symbol.
      • negativeSign

        public static java.lang.String negativeSign()
        Gets the current locale's negative sign symbol.
        Returns:
        the negative sign.
      • positiveSign

        public static java.lang.String positiveSign()
        Get the current locale's positive sign symbol.
        Returns:
        the positive sign.
      • decimalPoint

        public static java.lang.String decimalPoint()
        Gets the current locale's decimal point symbol.
        Returns:
        the decimal point.
      • thousandsSep

        public static java.lang.String thousandsSep()
        Gets the current locale's thousands separator symbol.
        Returns:
        the thousands separator.
      • systemDecimalPoint

        public static java.lang.String systemDecimalPoint()
        Gets the current system locale's decimal point symbol.
        Returns:
        the decimal point, as per the operating system's database, which may differ from this database. Nonetheless, this is important because it is what is used by the Java runtime.
      • systemDecimalPointAsChar

        public static char systemDecimalPointAsChar()
        Gets the current system locale's decimal point symbol.
        Returns:
        the decimal point, as per the operating system's database, which may differ from this database. Nonetheless, this is important because it is what is used by the Java runtime.