doc / ch.tutteli.atrium.reporting.translating / Locale

Locale

data class Locale (source)

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

Constructors

<init>

Locale(language: String, country: String)
Locale(language: String)Locale(language: String, script: String?, country: String?, variant: String?)

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

Properties

country

val country: String?

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

language

val language: String

consists of at least one letter and only letters

script

val script: String?

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

variant

val variant: String?

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

Functions

toString

fun toString(): String

Returns a string representation of Locale.

Extension Functions

toJavaLocale

fun Locale.toJavaLocale(): Locale

Transforms this Locale into a java.util.Locale.