Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Gettext of variables

Thread Tools

Gettext of variables

Matthew Hauck
Posts: n/a

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!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gettext localize strings with variables miamia Python 1 07-28-2011 02:36 PM
Put variables into member variables or function variables? C++ 9 03-23-2008 04:03 PM
plaindocument gettext() not working... tiewknvc9 Java 2 01-18-2006 03:59 PM
[ANT] apply-task and relative attribute (gettext-like internationalisation/localisation) Daniel Leidert Java 0 05-28-2005 10:44 AM
Error, if compiled with -O3 (gettext) Herbert Straub C++ 2 06-02-2004 10:32 AM