Access CLDR data: locale and region identifiers, localized region names, short and variant name alternatives, and embedded CLDR version metadata for easy internationalization lookups.
Kotlin JVM library for accessing Unicode CLDR (Common Locale Data Repository) data.
Currently provides locale identifiers, region/territory identifiers, and localized region names.
import io.fluidsonic.cldr.*
// CLDR data version included in this build
println(Cldr.version) // "48"// Available locale identifiers (e.g. "en", "de", "ja")val locales: Set<String> = Cldr.localeIds
// Available region/territory identifiers (e.g. "US", "DE", "JP")val regions: Set<String> = Cldr.regionIds
// Get the localized name of a region
Cldr.regionName("en", "US") // "United States"
Cldr.regionName("de", "US") // "Vereinigte Staaten"
Cldr.regionName("ja", "JP") // "日本"// Short and variant alternatives
Cldr.regionName("en", "US", CldrRegionNameAlternative.short) // "US"
Cldr.regionName("en", "US", CldrRegionNameAlternative.variant) // null (not available for all regions)
fluid-locale★ 15
fluidsonic
Library facilitates handling of BCP 47 language tags, allowing parsing, creating, and managing locale data with error handling for malformed tags. Supports language, script, region, and variants.