Raku Land



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


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

The newest version (v0.5) aims to maintain functionality but vastly improve performance, both mainly from a speed perspective, but also improves memory efficiency and will aide long term maintenance.

There have been slight API changes from previous versions, so as noted before, if using, please ensure that you add version information to your use statements (at least until v.1.0);

Do not use anything outside of the Intl::CLDR from this branch. Those functionalities are in the process of being spun off into their own modules. This is primarily for obtaining more-or-less raw data with proper fallbacks.

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-* or 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


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).