All Downloads are FREE. Search and download functionalities are using the official Maven repository.

linuxAndMingwMain.net.codinux.i18n.platform.Platform.kt Maven / Gradle / Ivy

Go to download

Localizing language, country, unit and currency names and formatting numbers and dates for Kotlin Multiplatform with the data from Unicode CLDR project

There is a newer version: 0.6.0
Show newest version
package net.codinux.i18n.platform

import net.codinux.i18n.LanguageTag

internal actual object Platform {

    // available locales may can be read from /usr/share/i18n/SUPPORTED, but that's of course not a robust and universal way to get all locales
    // "locale -a" didn't work on my system
    // This is may due to not all locales have been generated, see "cat /etc/locale.gen" for available and currently unavailable locales
    actual val AvailableLocales: List = LanguageTag.availableLanguageTags // for now use that ones from CLDR

    actual fun getSystemLocale() = PosixLocale.getSystemLocale()

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy