Interface General

  • All Known Implementing Classes:
    GeneralImpl

    public interface General
    • Method Detail

      • characterOrder

        CharacterOrderType characterOrder()
        Returns the character order for the current locale, e.g. "ltr" for left-to-right or "rtl" for right-to-left.
      • lineOrder

        LineOrderType lineOrder()
        Returns the line order for the current locale, e.g. "ttb" for top-to-bottom or "btt" for bottom-to-top.
      • bundle

        Bundle bundle()
        The current language bundle.
      • locale

        CLocale locale()
        The current locale.
      • resolveLocale

        CLocale resolveLocale​(java.lang.String tag)
        Resolve a language tag to a Locale.
      • parseLanguageTag

        LanguageTag parseLanguageTag​(java.lang.String tag)
        Parses a language tag and canonicalizes its fields.
      • measurementSystem

        MeasurementSystem measurementSystem()
        Returns the measurement system in use for the current locale generally.
      • measurementSystem

        MeasurementSystem measurementSystem​(MeasurementCategory category)
        Returns the measurement system in use for the current locale generally, or for a specific measurement category. For example, to get the correct measurement system for temperature you must pass in the category 'temperature'.
      • formatList

        java.lang.String formatList​(java.util.List<java.lang.String> items,
                                    ListPatternType type)
        Format a list of items with the given type.
      • formatListToParts

        java.util.List<Part> formatListToParts​(java.util.List<java.lang.String> items,
                                               ListPatternType type)
        Format a list of items with the given type to an array of parts.
      • getLanguageDisplayName

        java.lang.String getLanguageDisplayName​(java.lang.String code,
                                                DisplayNameOptions options)
        Returns the display name for the given language code.
      • getLanguageDisplayName

        java.lang.String getLanguageDisplayName​(LanguageTag tag,
                                                DisplayNameOptions options)
        Returns the display name for the given language code.
      • getScriptDisplayName

        java.lang.String getScriptDisplayName​(java.lang.String code,
                                              DisplayNameOptions options)
        Returns the display name for the given script code.
      • getScriptDisplayName

        java.lang.String getScriptDisplayName​(LanguageTag tag,
                                              DisplayNameOptions options)
        Returns the display name for the given script code.
      • getRegionDisplayName

        java.lang.String getRegionDisplayName​(java.lang.String code,
                                              DisplayNameOptions options)
        Returns the display name for the given region code.
      • getRegionDisplayName

        java.lang.String getRegionDisplayName​(LanguageTag tag,
                                              DisplayNameOptions options)
        Returns the display name for the given region code.