Localization (l10n) refers the adaptation of crabgrass to meet the linguistic, numeric, cultural and other requirements of a specific region. This might include:
L10n is not to be confused with i18n (internationalization), which refers to the capacity to be able to localize.
Here is a handy comparison chart of l10n plugins.
desired features for crabgrass:
possible features available in plugins:
:confirm_destroy_page
rather than "Are you sure you wish to destroy that page?"
. Otherwise, if you fix a typo in the original the other translations can get lost. This feature is explicit in some plugins. Even when the feature is not explicit, you can always just specify a symbol, but then it means you see the symbol if the key is untranslated instead of the text.app/users/view/show.en_US.rhtml
I don’t know anything about it.
auto-discovery: no
auto-stale: no
storage: yaml files
symbolic keys: yes
formats: none?
rails messages: no
rails helpers: no
Plugins:
“Globalize is generally said to be the most powerful all-in-one solution for Internationalization of Ruby on Rails applications.” (from the website). I think this is very much true.
Globalize is not lightweight. It attempts to be a full solution that covers all the bases and also can be used to translate content. For example, it includes l10n data for 7599 languages and 239 countries.
I (elijah) have used globalize for nest, and there are some things I like. I like the ability of users to enter new translations through the rails app itself and that it supports auto-discovery and auto-stale (with a little hacking). I don’t like that it hits the database so much (untranslated strings always result in a db query), that caching of strings in memory doesn’t work by default without hacking the code, and that when you edit an existing translation you have to restart mongrels to see the change (which defeats a lot of the fun of having users be able to edit the translations).
The other thing that is attractive about globalize is that it handles number, date, and currency formats really well, and has data for what seems to be every country on earth.
auto-discovery: yes
auto-stale: yes (not by default, but you can add updated_at to the view_translations table)
storage: database
local views: yes
formats: number, date, currency.
symbolic keys: no
rails messages: yes
rails helpers: yes
other features: allows for translation of content not just the UI.
Code example:
<%= "First name".t %> # globalize style
<%= _("Last name") %> # gettext style
There are many others, but those are the top three, I think.