gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Message translation


From: Tez Kamihira
Subject: [Gnu-arch-users] Message translation
Date: Sat, 12 Jun 2004 12:47:57 +0900 (JST)

Basically, it worked. but I have an additional questions.

o     Can I get tla's running context ?

when activating gettext() stuff, strictly speaking,
tla isn't monolithic program any more, because it
depends on *.po files.

before "make install", tla stays in something like
"src/=build/tla/tla/tla" or so. In this case, I'd like
to use "src/=build/locale/ja/LC_MESSAGES/tla.mo" or so. but
after "make install", tla exists at
  "/usr/local/bin/tla"
or so, and corresponding *.po files are at
  "/usr/local/locale/ja/LC_MESSAGES/tla.mo".
and we should use this one.

so I'd like to some switch statement in main() of tla.c,
just like:

./src/tla/tla/tla.c:

    int
    main (int argc, char * argv[])
    {
      int x;
      char * cmd;

      setlocale (LC_ALL, "");
      if (cfg__tla_is_in_installed_context)
      {
        bindtextdomain (PACKAGE, cfg__std__prefix + "/locale");
              /* yep, it's pseudo operation ------^ */
      }
      else
      {
        bindtextdomain (PACKAGE, get_test_time_locale_dir());
      }
      textdomain (PACKAGE);

     ...

get_test_time_locale_dir()
{
/*
   1. get this program's absolute path.
   2. strip some tail part of it.
   3. add "/locale" string to 2.
   4. return it.
*/
}

Can I get "cfg__tla_is_in_installed_context" ?

or any other good idea ?



      - Tez




reply via email to

[Prev in Thread] Current Thread [Next in Thread]