[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gettext doesnt work
From: |
Georg Horn |
Subject: |
gettext doesnt work |
Date: |
Mon, 28 Apr 2003 19:58:27 +0200 |
Hi,
i have a problem with gettext on a slackware 9.0 system with
gcc 3.2.2 and glibc 2.3.1. I have the following C program:
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <libintl.h>
int main(void)
{
putenv("LANG=de");
bindtextdomain("test", "/home/horn/tmp");
textdomain("test");
setlocale(LC_ALL, "");
puts(gettext("bla"));
return 0;
}
/home/horn/tmp/de/LC_MESSAGES/ has these files:
-rw-r--r-- 1 horn root 58 Apr 25 11:50 test.mo
-rw-r--r-- 1 horn root 29 Apr 25 10:45 test.po
test.po contains:
msgid "bla"
msgstr "blubb"
and test.po is built from test.mo with msgfmt -otest.mo test.po
but the test-program always says "bla" instead of "blubb". With strace i
can see, that it not even tries to open some file below /home/horn/tmp
Setting the envoronment variable LANG to "de" within the shell
doesn't work to.
Is this a bug or am i missing something? (The same program works on an old
SuSe-System with libc-2.1.2 and gcc version egcs-2.91.66)
Bye and TIA,
Georg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gettext doesnt work,
Georg Horn <=