[Rails I18n] GetText on Struct

Vitali Danilow boblgum at nnms.de
Fri May 2 08:31:40 EDT 2008


hi @ll

is it possible to mark whole struct for translation? something like:

MyStrct = Struct.new(:code, :msg)
SOME_CONSTANT = N_(MyStrct.new("1515", "Message to translate"))
...
puts _(SOME_CONSTANT)


may be u have a better sollution for this?

thnx
-- 
Posted via http://www.ruby-forum.com/.


More information about the Railsi18n-discussion mailing list