Ruby Forum Rails I18n > GetText on Struct

Posted by Vitali Danilow (boblgum)
on 02.05.2008 14:31
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