Unicode CLDR (Common Locale Data Repository) data and Lua interface.
From the CLDR website:
The Unicode CLDR provides key building blocks for software to support the world's languages, with the largest and most extensive standard repository of locale data available.
For now, data and interfaces will be added on an as-needed basis. Here is a basic rundown of the data available upstream vs. what this library currently provides.
All included data is based on Unicode's CLDR 42 data set.
- dates
- times
- timezones
- numbers and currency values
- measurement units
- …
- languages
- scripts
- countries and regions
- currencies
- eras
- months
- weekdays
- day periods
- time zones
- cities
- and time units
- emoji characters and sequences (and search keywords)
- …
- characters used
- plural cases
- gender of lists
- capitalization
- rules for sorting & searching
- writing direction
- transliteration rules
- rules for spelling out numbers
- rules for segmenting text into graphemes, words, and sentences
- keyboard layouts
- …
- language usage
- currency information
- calendar preference
- week conventions
- …
Definitions, aliases, and validity information for Unicode
- locales
- languages
- scripts
- regions
- extensions
- …
local CLDR = require("cldr")
-- Table (pl.Set) of all available locales
CLDR.locales
Please see CHANGELOG.md.
The CLDR data is provided upstream in LDML format (XML based). A JSON dump is also available.
The Lua interfaces and code in this project are licensed under the MIT license.
All CLDR data provided by the Unicode Consortium is governed by the Unicode Terms of Use.