I’ve finally come around working on my cldr code a little bit.

The goals of this library are twofold:

  • provide access to CLDR data in Ruby
  • provide means to use CLDR data (such as formats) in Ruby

At the same time I want to:

  • not tie the library to neither I18n nor Rails but
  • make it very easy to use and extend it in I18n and/or Rails

As CLDR provides not only well maintained but also tons of data people
need to be able to export particular slices or aspects of the data
they’re interested in (e.g. maybe they only want number formats for a
single language).

The current state allows to:

  • export data to YAML (and Ruby for plural rules) using a thor commands
    (optionally exports specified locales and/or data components)
  • format numbers (decimal, percentage, currency), dates, times,
    datetimes using this data

I’ve also added a module to I18n that can be included to the Simple
backend and will overwrite the #localize method:

One of the things I want to look into next is exporting the CLDR data as
Ruby classes (as an alternative to YAML).

Obviously, this is all still in a very early state but feeback,
suggestions etc. are very welcome.

Enjoy :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs