I wanted a ruby version of the Java Locale object and couldn’t find one, so i created a project for it. Here’s the address:
http://rubyforge.org/projects/locale/
It is pretty minimal, but it does contain all the current ISO country and language codes as well as a simple class for accessing them. It is also in a rails compliant plugin layout so it can just be dropped into the rails vendor/plugin directory.
The unit tests are failing, but it is just a numbering issue, which I’ll fix this afternoon or next week.
Enjoy.
You have some typos in Locale.rd, “Locale.setlocal” should be “Locale.setlocale”
Thanks for the package 🙂
LikeLike
Oops, sorry I misread rubyforge with sourceforge (there is another ruby-locale in sf.net) Sorry
LikeLike
No problem. That project works mainly with the system locale and the Unix method of localizing applications. It doesn’t provide any API to construct and find locales, that’s what my project is for. You should be able to use them together quite nicely. If you have, or anyone has, issues with the inter-op, just let me know (or open a bug) and I’ll fix them.
LikeLike