On Tue, Nov 11, 2008 at 03:39:36PM +0300, Alexey I. Froloff wrote: > * Alexey Tourbin [081111 15:21]: > > Согласно locale(7), в качестве языка для надписей меню надо выбирать > > сначала LC_ALL, потом (если LC_ALL пустой) LC_MESSAGES, LANGUAGE, потом > > LANG, потом "C". > LANGUAGE - GNU'тое расширение, и в locale(7) про него ни слова не > написано. man-pages-3.09-alt1. LC_MESSAGES changes the language messages are displayed in and what an affirmative or negative answer looks like. The GNU C-library contains the gettext(3), ngettext(3), and rpmatch(3) functions to ease the use of these information. The GNU gettext family of functions also obey the environment variable LANGUAGE. ... If the second argument to setlocale(3) is empty string, "", for the default locale, it is determined using the follow‐ ing steps: 1. If there is a non-null environment variable LC_ALL, the value of LC_ALL is used. 2. If an environment variable with the same name as one of the categories above exists and is non-null, its value is used for that category. 3. If there is a non-null environment variable LANG, the value of LANG is used. Если следовать этому алгоритму выбора дефолтной локали, тогда надо: в силу 1 смотреть LC_ALL; далее в силу 2 смотреть LC_MESSAGES (категория надписей); далее в силу дополнения к LC_MESSAGES смотреть LANGUAGE; в силу 3 смотреть LANG. Как, имея на руках /etc/sysconfig/i18n, прописать язык в /etc/menu/methods/lang.h? У меня пока получается так: unset LC_ALL LC_MESSAGES LANGUAGE LANG . /etc/sysconfig/i18n lang=${LC_ALL:-${LC_MESSAGES:-${LANGUAGE:-${LANG:-"C"}}}} Предлагайте исправленный вариант. > Во-первых там список, во вторых оно таки игнорирует LC_ALL, > LC_xxx и LANG, если локаль не C. > > http://www.gnu.org/software/automake/manual/gettext/The-LANGUAGE-variable.html > > This is done through a different environment variable, called > LANGUAGE. GNU gettext gives preference to LANGUAGE over LC_ALL > and LANG for the purpose of message handling, but you still need > to have LANG (or LC_ALL) set to the primary language; this is > required by other parts of the system libraries. For example, > some Swedish users who would rather read translations in German > than English for when Swedish is not available, set LANGUAGE to > 'sv:de' while leaving LANG to 'sv_SE'. > > Note: The variable LANGUAGE is ignored if the locale is set to > 'C'. In other words, you have to first enable localization, by > setting LANG (or LC_ALL) to a value other than 'C', before you > can use a language priority list through the LANGUAGE variable.