Language

@Serializable(with = Language.Serializer::class)
class Language(code: String)

Represents a language with its region.

Parameters

code

BCP-47 language code

Constructors

Link copied to clipboard
constructor(code: String)
constructor(locale: Locale)

Creates a Language from a Java Locale.

Properties

Link copied to clipboard

BCP-47 language code.

Link copied to clipboard

Indicates whether this language is a regional variant.

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Returns this Language after stripping the region.

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