[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libintl adjusting local search paths by environment variable
From: |
Bruno Haible |
Subject: |
Re: libintl adjusting local search paths by environment variable |
Date: |
Thu, 24 Sep 2020 23:34:22 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) |
Hi Witold,
> It would be nice to use unmodified binary, and prepend search paths.
>
> GETTEXT_PATHS=adriconf=/home/user/.loca/share/locale
>
> to adjust the search path.
>
> or
>
> GETTEXT_GMO=adriconf=./pl.gmo
>
> to force directly a specific translation, independent of what
> LC_MESSAGES / LANG / LC_ALL / LANGUAGE says.
>
> or something like that.
>
> Both of these env variables could contain multiple domains (probably
> separated by colon as it is used to).
>
> Is it already possible, and where it is documented?
>
> (requirements: no root, no program recompile).
It is already possible, albeit through a hack: In LANGUAGE, you can specify
a relative file name of a language directory.
For example, if you have a modified coreutils.mo sitting in
/tmp/mylocale/pl/coreutils.mo
you can run
LANGUAGE=../../../../../tmp/mylocale/pl some-coreutils-program
Yes, it is silly that relative file names are accepted but absolute
file names don't work...
Bruno