jvmMain.dev.icerock.moko.resources.desc.StringDesc.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources-jvm Show documentation
Show all versions of resources-jvm Show documentation
Resources access for Kotlin Multiplatform development (mobile first)
The newest version!
/*
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/
package dev.icerock.moko.resources.desc
import java.util.Locale
actual interface StringDesc {
fun localized(): String
actual sealed class LocaleType {
abstract val currentLocale: Locale
actual data object System : LocaleType() {
override val currentLocale: Locale get() = Locale.getDefault()
}
actual class Custom actual constructor(
locale: String
) : LocaleType() {
override val currentLocale: Locale = Locale.forLanguageTag(locale)
}
}
actual companion object {
actual var localeType: LocaleType = LocaleType.System
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy