Locale
-
Cmn
class Locale
A Locale object represents a specific geographical, political, or cultural region. An operation that requires a Locale to perform its task is called locale-sensitive and uses the Locale to tailor information for the user. For example, displaying a number is a locale-sensitive operation— the number should be formatted according to the customs and conventions of the user's native country, region, or culture.
Summary
Public companion properties |
||
|---|---|---|
Locale |
Returns a |
Cmn
android
|
Public constructors |
|
|---|---|
|
Create Locale object from a language tag. |
Cmn
android
|
|
android
|
Public functions |
||
|---|---|---|
open operator Boolean |
Cmn
android
|
|
open Int |
hashCode() |
Cmn
android
|
String |
Returns a IETF BCP47 compliant language tag representation of this Locale. |
Cmn
android
|
open String |
toString() |
Cmn
android
|
Public properties |
||
|---|---|---|
String |
The ISO 639 compliant language code. |
Cmn
android
|
Locale |
android
|
|
String |
The ISO 3166 compliant region code. |
Cmn
android
|
String |
The ISO 15924 compliant 4-letter script code. |
Cmn
android
|
Public functions
toLanguageTag
fun toLanguageTag(): String
Returns a IETF BCP47 compliant language tag representation of this Locale.
| Returns | |
|---|---|
String |
A IETF BCP47 compliant language tag. |