Rand Stats

Intl::CLDR

zef:guifa

¿Cómo se diz na vuestra, na nuestra llingua, la palabra futuru?
— Lecciones de gramática (Berta Piñán)

Intl::CLDR

An attempt to bring in the data from CLDR into Raku.

As of v0.5.0, performance was vastly improved but some slight API changes were needed. Always ensure to use a version statement. (at least until v.1.0)

To install, be aware that due to the number of files, you may need to increase the maximum number of open files (on most systems, the default is several thousand, but on macOS, it's a paltry 256).

> ulimit -n 4096
> zef install Intl::CLDR

CLDR objects

Each CLDR::* object is Associative, and attributes can generally be accessed both from hashy accessors ({'foo'}) or method/attribute accessors (.foo). True attributes are defined with kebab-case, but camel-case alternates are available as well (this is because CLDR began with camel case, and now tends to prefer kebab-case, and it's hard to remember when to use which).

Other thoughts

Because CLDR is designed to be stable, they have had to make some odd design choices for legacy compatibility. An obvious example of this is the <codePatterns> vs <localeDisplayPattern> that really logically should go together. This also happens with the dateFormats, timeFormats, and dateTimeFormats. The latter three are currently organized exactly as in CLDR, but I may rearrange these simply to provide a more convenient/logical method of accessing things (e.g. calendar.formats<time date datetime interval>).

Version History

License

The resources directory "cldr-common" comes directly from the Unicode CLDR data. These files are copyrighted by Unicode, Inc., and are available and distributed in accordance with their terms, which are also distributed in that directory.

Everything else (that is, all the Raku code), is licensed under the Artistic License 2.0 (see license file).