Package com.squarespace.cldrengine.api
Interface General
-
- All Known Implementing Classes:
GeneralImpl
public interface General
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Bundle
bundle()
The current language bundle.CharacterOrderType
characterOrder()
Returns the character order for the current locale, e.g.java.lang.String
formatList(java.util.List<java.lang.String> items, ListPatternType type)
Format a list of items with the given type.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.java.lang.String
getLanguageDisplayName(LanguageTag tag, DisplayNameOptions options)
Returns the display name for the given language code.java.lang.String
getLanguageDisplayName(java.lang.String code, DisplayNameOptions options)
Returns the display name for the given language code.java.lang.String
getRegionDisplayName(LanguageTag tag, DisplayNameOptions options)
Returns the display name for the given region code.java.lang.String
getRegionDisplayName(java.lang.String code, DisplayNameOptions options)
Returns the display name for the given region code.java.lang.String
getScriptDisplayName(LanguageTag tag, DisplayNameOptions options)
Returns the display name for the given script code.java.lang.String
getScriptDisplayName(java.lang.String code, DisplayNameOptions options)
Returns the display name for the given script code.LineOrderType
lineOrder()
Returns the line order for the current locale, e.g.CLocale
locale()
The current locale.MeasurementSystem
measurementSystem()
Returns the measurement system in use for the current locale generally.MeasurementSystem
measurementSystem(MeasurementCategory category)
Returns the measurement system in use for the current locale generally, or for a specific measurement category.LanguageTag
parseLanguageTag(java.lang.String tag)
Parses a language tag and canonicalizes its fields.CLocale
resolveLocale(java.lang.String tag)
Resolve a language tag to a Locale.
-
-
-
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.
-
-