Package-level declarations

Types

Link copied to clipboard
expect class Locale(language: String, country: String, variant: String)

Class representing a locale

actual data class Locale(val language: String, val country: String, val variant: String)
actual typealias Locale = java.util.Locale
actual data class Locale(val language: String, val country: String, val variant: String)

Properties

Link copied to clipboard

Property to access Locale.getCountry

Link copied to clipboard

Global instance to give access to the configuration

Link copied to clipboard

Property to access Locale.getLanguage

Link copied to clipboard

Creates a locale that is one step less specific than this locale.

Link copied to clipboard
actual val systemLocale: Locale
expect val systemLocale: Locale

The current locale of the system or user

actual val systemLocale: Locale
actual val systemLocale: Locale
actual val systemLocale: Locale
actual val systemLocale: Locale
Link copied to clipboard

Property to access Locale.getVariant

Functions

Link copied to clipboard
fun forLocaleTag(languageTag: String, separator: String = "_"): Locale

Transforms a languageTag like "en_US_WIN" to a Locale("en","US","WIN")

Link copied to clipboard

Returns a name for the locale that is appropriate for display to the user in the language of the locale

Link copied to clipboard
fun Locale.toTag(separator: String = "_"): String