LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   [Internationalization] Using gettext on the CLI (http://www.linuxquestions.org/questions/programming-9/%5Binternationalization%5D-using-gettext-on-the-cli-400425/)

natetheros 01-06-2006 10:21 PM

[Internationalization] Using gettext on the CLI
 
I'm having trouble getting the gettext command line app to do what it's supposed to. I'm running Debian with a 2.6.x kernel.

I have a test.po file that looks like this:

-------------------------
#
msgid "FOO1"
msgstr "This is a test"

#
msgid "FOO2"
msgstr "This is another test"
-------------------------

...and have used msgfmt to create a binary test.mo file, which resides in /usr/share/locale/en/LC_MESSAGES/

Now, when I run this on the command line (under the en locale):

gettext -s -d test FOO1

I believe I should get the translated text, but instead I get "FOO1" printed out again.

Anyone have experience with gettext to know why this isn't working?

Cheers!


All times are GMT -5. The time now is 10:38 AM.