# GetText on Struct

**URL:** <https://www.ruby-forum.com/t/gettext-on-struct/136477>\
**Category:** Rails I18n\
**Created:** [May 2, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/gettext-on-struct/136477 "2008-05-02T14:31:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boblgum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@boblgum](https://www.ruby-forum.com/u/boblgum)\
**Post date:** [May 2, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/gettext-on-struct/136477/1 "2008-05-02T14:31:40Z")

</div>

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
