On Tue, Dec 14, 2004 at 12:05:40PM +0300, Alexey I. Froloff wrote: > * Alexey I. Froloff [041214 11:29]: > > Всвязи с этим вопрос - куда девать ГНУтое расширение под > > названием LANGUAGE? Вариантов два: > Посмотрел как сделано в gettext... > > Если есть LANGUAGE - использовать его, при условии что данная > категория локали не выставлена в "C"... > > Однако берут меня сомнения... У LC_ALL должен быть самый большой > приоритет. В gettext(3) написано следующее: Translation lookup operates in the context of the current locale. For the gettext and dgettext functions, the LC_MESSAGES locale facet is used. It is determined by a preceding call to the setlocale function. setlocale(LC_ALL,"") initializes the LC_MESSAGES locale based on the first nonempty value of the three environment variables LC_ALL, LC_MESSAGES, LANG; see setlocale(3). For the dcgettext function, the locale facet is determined by the category argument, which should be one of the LC_xxx constants defined in the header, excluding LC_ALL. In both cases, the functions also use the LC_CTYPE locale facet in order to convert the translated message from the translator's codeset to the current locale's codeset, unless overridden by a prior call to the bind_textdomain_codeset function. The message catalog used by the functions is at the pathname dirname/locale/category/domainname.mo. Here dirname is the directory specified through bindtextdomain. Its default is system and configuration dependent; typically it is prefix/share/locale, where prefix is the installation prefix of the package. locale is the name of the current locale facet; the GNU implementation also tries generalizations, such as the language name without the territory name. category is LC_MESSAGES for the gettext and dgettext functions, or the argument passed to the dcgettext function. If the LANGUAGE environment variable is set to a nonempty value, and the locale is not the "C" locale, the value of LANGUAGE is assumed to contain a colon separated list of locale names. The functions will attempt to look up a translation of msgid in each of the locales in turn. This is a GNU extension. Было бы разумно реализовать аналогичное поведение. -- ldv