LocaleData
class LocaleData
kotlin.Any | |
↳ | android.icu.util.LocaleData |
A class for accessing miscellaneous data in the locale bundles
Summary
Nested classes | |
---|---|
Enumeration for representing the measurement systems. |
|
A class that represents the size of letter head used in the country |
Constants | |
---|---|
static Int |
Delimiter type for |
static Int |
Delimiter type for |
static Int |
Delimiter type for |
static Int |
Delimiter type for |
Public methods | |
---|---|
static VersionInfo! |
Returns the current CLDR version |
String! |
getDelimiter(type: Int) Retrieves a delimiter string from the locale data. |
static LocaleData! |
Gets the LocaleData object associated with the default |
static LocaleData! |
getInstance(locale: ULocale!) Gets the LocaleData object associated with the ULocale specified in locale |
static LocaleData.MeasurementSystem! |
getMeasurementSystem(locale: ULocale!) Returns the measurement system used in the locale specified by the locale. |
Boolean |
Gets the "no substitute" behavior of this locale data object. |
static LocaleData.PaperSize! |
getPaperSize(locale: ULocale!) Returns the size of paper used in the locale. |
Unit |
setNoSubstitute(setting: Boolean) Sets the "no substitute" behavior of this locale data object. |
Constants
ALT_QUOTATION_END
static val ALT_QUOTATION_END: Int
Delimiter type for getDelimiter(int)
.
Value: 3
ALT_QUOTATION_START
static val ALT_QUOTATION_START: Int
Delimiter type for getDelimiter(int)
.
Value: 2
QUOTATION_END
static val QUOTATION_END: Int
Delimiter type for getDelimiter(int)
.
Value: 1
QUOTATION_START
static val QUOTATION_START: Int
Delimiter type for getDelimiter(int)
.
Value: 0
Public methods
getCLDRVersion
static fun getCLDRVersion(): VersionInfo!
Returns the current CLDR version
getDelimiter
fun getDelimiter(type: Int): String!
Retrieves a delimiter string from the locale data.
Parameters | |
---|---|
type |
Int: The type of delimiter string desired. Currently, the valid choices are QUOTATION_START, QUOTATION_END, ALT_QUOTATION_START, or ALT_QUOTATION_END. |
Return | |
---|---|
String! |
The desired delimiter string. |
getInstance
static fun getInstance(): LocaleData!
Gets the LocaleData object associated with the default FORMAT
locale
Return | |
---|---|
LocaleData! |
A locale data object. |
getInstance
static fun getInstance(locale: ULocale!): LocaleData!
Gets the LocaleData object associated with the ULocale specified in locale
Parameters | |
---|---|
locale |
ULocale!: Locale with thich the locale data object is associated. |
Return | |
---|---|
LocaleData! |
A locale data object. |
getMeasurementSystem
static fun getMeasurementSystem(locale: ULocale!): LocaleData.MeasurementSystem!
Returns the measurement system used in the locale specified by the locale.
Parameters | |
---|---|
locale |
ULocale!: The locale for which the measurement system to be retrieved. |
Return | |
---|---|
LocaleData.MeasurementSystem! |
MeasurementSystem the measurement system used in the locale. |
getNoSubstitute
fun getNoSubstitute(): Boolean
Gets the "no substitute" behavior of this locale data object.
Return | |
---|---|
Boolean |
Value for the no substitute behavior. If true, methods of this locale data object will return an error when no data is available for that method, given the locale ID supplied to the constructor. |
getPaperSize
static fun getPaperSize(locale: ULocale!): LocaleData.PaperSize!
Returns the size of paper used in the locale. The paper sizes returned are always in milli-meters.
Parameters | |
---|---|
locale |
ULocale!: The locale for which the measurement system to be retrieved. |
Return | |
---|---|
LocaleData.PaperSize! |
The paper size used in the locale |
setNoSubstitute
fun setNoSubstitute(setting: Boolean): Unit
Sets the "no substitute" behavior of this locale data object.
Parameters | |
---|---|
setting |
Boolean: Value for the no substitute behavior. If true, methods of this locale data object will return an error when no data is available for that method, given the locale ID supplied to the constructor. |