Forum: Ruby on Rails Just another localization thread

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
juca (Guest)
on 2005-11-20 04:52
(Received via mailing list)
Hey all,

I was playing w/ Thomas Fuch's Localization module (thanks Thomas!), and
just realized how hard is to localize an application in Rails :-)
The Localization module works nice, but the problem is the error
messages. Its not that good to keep the application in [your idiom] and
the error messages in english. I saw the other threads about it,
specially the ones that recommends overriding the default error messages
w/ your own messages by changing rails main code (and similar
approaches), but I (just like many of us) think its too invasive.

So, I think we can make some changes to Rails to use some l10n module by
default (the Thomas Fuch's one is fine to mee). Rails messages can be
stored in /lang/default.rb w/ something like this:

Localization.define('en_US') do | l | "internal.error.blank", "{field} can't be blank"

So, we are able to easily override this w/
Localization.define('pt_BR') do | l | "internal.error.blank", "O campo {field} não pode estar
em branco"

That way, the applications that doesn't uses l10n at all doesn't need to
define the l10n values *just* for error messages. The default is fine
(just like the current one). And the applications that uses l10n can
override this values.

Since "talk is cheap" (r), I'm a volunteer to make something running
this way. I just need an "ok, do that and lets talk again" or an "shut
up, l10n suxx0r". And yes, if possible, a rails hacker help is welcome

juraci krohling
juca [the at sign] jkcosta dot info
kyle (Guest)
on 2005-11-20 05:04
(Received via mailing list)
Maybe you should listen in on some of the localization threads in
rails-core.  There's potentially two hang ups.

1.  The core team AFAIK don't all feel that any of the localization
plugins are ready for the the big time.  Multi-lingual rails is
getting close imho.
2.  I don't know that there's a list of all of the messages in a
sufficient variety of languages to be useful.

Maybe a good next step would be compiling a table of the error
messages in multiple languages.
This topic is locked and can not be replied to.