Forum: Rails I18n ruby-cldr

402602a60e500e85f2f5dc1ff3648ecb?d=identicon&s=25 Sven Fuchs (Guest)
on 2010-01-16 20:49
(Received via mailing list)
I've finally come around working on my cldr code a little bit.

  http://github.com/svenfuchs/ruby-cldr
  http://gemcutter.org/gems/ruby-cldr

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:

  http://github.com/svenfuchs/i18n/blob/master/lib/i...


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 :)
This topic is locked and can not be replied to.