On Sun, Feb 12, 2006 at 06:27:35PM +0100, Claudio Nieder wrote: > Having LANG and LANGUAGE set to de_CH and LC_* to en_GB did not work: > > # env | grep -e '^LC' -e '^LANG'; adduser au-test > LC_PAPER=en_GB.UTF-8 > LC_ADDRESS=en_GB.UTF-8 > LC_MONETARY=en_GB.UTF-8 > LC_NUMERIC=en_GB.UTF-8 > LC_ALL=en_GB.UTF-8 > LC_TELEPHONE=en_GB.UTF-8 > LC_MESSAGES=en_GB.UTF-8
You need to set LC_MESSAGES=de_CH.UTF-8 But you could drop everything and only keep LANG=de_CH.UTF-8 > > The only documentation that I know of is in libc.info, search for > > I have trouble either finding this on my computer or finding any package > containing libc.info (or libc6.info) searching on http://pdo.debian.net/ > > Which package need I to install to get this info file and how is it called on > Debian? glibc-doc > Also one question regarding nl_langinfo and gettext, with whom I'm not > familiar yet. > > From my understanding of what was discussed here, gettext is used to > translate > messages according to a catalog which I assume is supplied by the > application. Which catalog is choosen, or if the untranslated messages are > presented depends not only on the user configuration ($LANGUAGE) but also on > the catalogs supplied by the application. Right. > nl_langinfo(YESEXPR) using another environment variable suggests to me, that > it is totally handled in libc. Right, but usually people have consistent choices ;) > If my understanding is right, then adduser or any other application prompting > for y/n would be in trouble even with a consistent setting of environment > variables, unless it supplies message catalogs for every language which is > supported by nl_langinfo. Otherwise, if for libc supported language xx_YY no > message catalog is supplied, the user would receive the prompt in > untranslated english (y/N), but expected to type either ä or è because thats > what nl_langinfo expects for language xx_YY. You are also right, but for this exact reason, y/n answers are also taken into account when they are unambiguous. For instance in German, you can type y or j for yes, and n for no. Denis

