omid - <[email protected]> writes:

> This is a large program with lots of files, I don't know which part of
> it you need.  I'm still trying to fix this problem and I can't
> succeed.

I'd suggest to minimize the problem.  Are you able to reproduce this
with a small standalone program like this?

#include <libintl.h>
#include <locale.h>
#include <iostream>

int
main (void)
{
  setlocale (LC_ALL, "de_DE");
  textdomain ("ClientCommand");
  bindtextdomain ("ClientCommand", "/home/znctest/locale");
  std::cout << gettext("hello, world!") << "\n";
  return 0;
}

> Well I set the language in setlocale (LC_ALL, "de_DE") So I dont think
> that LANGUAGE var is the problem.

Well, with the above program, I see the different strace output depending
on LANGUAGE:

$ unset LANGUAGE
$ strace -e trace=open ./a.out
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/home/znctest/locale/de_DE/LC_MESSAGES/ClientCommand.mo", O_RDONLY) = -1 
ENOENT (No such file or directory)
open("/home/znctest/locale/de/LC_MESSAGES/ClientCommand.mo", O_RDONLY) = -1 
ENOENT (No such file or directory)
hello, world!
+++ exited with 0 +++

$ LANGUAGE=C strace -e trace=open ./a.out                      ~
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
hello, world!
+++ exited with 0 +++

Regards,
-- 
Daiki Ueno

Reply via email to