+6
−4
+402
−27
Loading
The gettext family returned every msgid untranslated. Now catalogs are
read: <dir>/<language>/<category>/<domain>.mo, dir from bindtextdomain()
(per domain, default /usr/share/locale), languages from LANGUAGE or else
LC_ALL / LC_<category> / LANG, each also without codeset and territory
(de_DE.UTF-8 -> de_DE -> de); nothing is translated in the C/POSIX locale.
Catalogs are mapped once and searched by binary search in their sorted
msgid table (both byte orders); ngettext evaluates the catalog's
Plural-Forms expression (C operators incl. ?:, e.g. the Polish rule);
msgctxt entries work through the usual "ctx\004msgid" key.
bind_textdomain_codeset() is remembered per domain (strings stay UTF-8).
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>