Locale

data class Locale(val language: String, val script: String?, val country: String?, val variant: String?)(source)

Represents a platform independent representation of a locale consisting of a language, a script, a country and a variant.

Constructors

Link copied to clipboard
constructor(language: String, country: String)
constructor(language: String)
constructor(language: String, script: String?, country: String?, variant: String?)

Properties

Link copied to clipboard

can be null or needs to consist of at least one letter and only letters

Link copied to clipboard

consists of at least one letter and only letters

Link copied to clipboard

can be null or needs to consist of at least one letter and only letters

Link copied to clipboard

can be null or needs at least one character, cannot be blank though (use null instead)

Functions

Link copied to clipboard

Transforms this Locale into a java.util.Locale.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of Locale.