Gettext of variables

Greetings!

Basically, I would like to do the following:


string = ‘test string’
puts _(string)

But, it seems that gettext does not seem to work on variables, only on
literals. I am a newbie to gettext. I can get it to translate literals
fine. But it will not translate variables, even when I am sure that
the value of the variable is indeed translated in the mo file.

Any thoughts? Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs