AppLocale

actual typealias AppLocale = ULocale

Represents a locale in the application.

This expect class is mapped to target-specific platform types:

  • JVM: java.util.Locale

  • Android: android.icu.util.ULocale

  • iOS/macOS (Apple): platform.Foundation.NSLocale

  • Web/JS: String (representing language/locale tag)

Example:

val locale = localeForLanguageTag("en-US")
val tag = locale.languageTag
actual typealias AppLocale = NSLocale

Represents a locale in the application.

This expect class is mapped to target-specific platform types:

  • JVM: java.util.Locale

  • Android: android.icu.util.ULocale

  • iOS/macOS (Apple): platform.Foundation.NSLocale

  • Web/JS: String (representing language/locale tag)

Example:

val locale = localeForLanguageTag("en-US")
val tag = locale.languageTag
expect class AppLocale

Represents a locale in the application.

This expect class is mapped to target-specific platform types:

  • JVM: java.util.Locale

  • Android: android.icu.util.ULocale

  • iOS/macOS (Apple): platform.Foundation.NSLocale

  • Web/JS: String (representing language/locale tag)

Example:

val locale = localeForLanguageTag("en-US")
val tag = locale.languageTag
actual typealias AppLocale = Locale

Represents a locale in the application.

This expect class is mapped to target-specific platform types:

  • JVM: java.util.Locale

  • Android: android.icu.util.ULocale

  • iOS/macOS (Apple): platform.Foundation.NSLocale

  • Web/JS: String (representing language/locale tag)

Example:

val locale = localeForLanguageTag("en-US")
val tag = locale.languageTag
actual typealias AppLocale = String

Represents a locale in the application.

This expect class is mapped to target-specific platform types:

  • JVM: java.util.Locale

  • Android: android.icu.util.ULocale

  • iOS/macOS (Apple): platform.Foundation.NSLocale

  • Web/JS: String (representing language/locale tag)

Example:

val locale = localeForLanguageTag("en-US")
val tag = locale.languageTag

Properties

Link copied to clipboard

The display name of this AppLocale, formatted for display to users.

The display name of this AppLocale, formatted for display to users.

The display name of this AppLocale, formatted for display to users.

The display name of this AppLocale, formatted for display to users.

The display name of this AppLocale, formatted for display to users.

Link copied to clipboard

The language code representing the primary language of this AppLocale.

The language code representing the primary language of this AppLocale.

The language code representing the primary language of this AppLocale.

The language code representing the primary language of this AppLocale.

The language code representing the primary language of this AppLocale.

Link copied to clipboard

The unique BCP 47 language tag identifying this AppLocale.

The unique BCP 47 language tag identifying this AppLocale.

The unique BCP 47 language tag identifying this AppLocale.

The unique BCP 47 language tag identifying this AppLocale.

The unique BCP 47 language tag identifying this AppLocale.

Link copied to clipboard

The region or country code of this AppLocale.

The region or country code of this AppLocale.

The region or country code of this AppLocale.

The region or country code of this AppLocale.

The region or country code of this AppLocale.