commonMain.ru.astrainteractive.klibs.locale.LocaleProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mikro-locale Show documentation
Show all versions of mikro-locale Show documentation
Kotlin Multiplatform library with useful code
The newest version!
package ru.astrainteractive.klibs.locale
/**
* Locale provider is an interface which allows us to handle user locale without depending on JVM,Android or IOS
*
*/
interface LocaleProvider {
/**
* List of all locales
*/
val availableLocales: List
/**
* List of locales sorted alphabetically
*/
val sortedLocaleNames: List
/**
* Returns default system language
*/
val systemDefaultLanguage: SharedLocale
/**
* Converts locale from [SharedLocale.Name] into [SharedLocale]
*/
fun fromName(name: SharedLocale.Name?): SharedLocale?
/**
* Converts locale from [SharedLocale.Code] into [SharedLocale]
*/
fun fromCode(code: SharedLocale.Code?): SharedLocale?
}