Spec-Zone.ru › Linux man pages

ngettext(3) — Справочная страница Linux

NGETTEXT(3)             Library Functions Manual             NGETTEXT(3)

НАЗВАНИЕ

       ngettext, dngettext, dcngettext - translate message and choose
       plural form

СИНТАКСИС

       #include <libintl.h>

       char * ngettext (const char * msgid, const char * msgid_plural,
                        unsigned long int n);
       char * dngettext (const char * domainname,
                         const char * msgid, const char * msgid_plural,
                         unsigned long int n);
       char * dcngettext (const char * domainname,
                          const char * msgid, const char * msgid_plural,
                          unsigned long int n, int category);

ОПИСАНИЕ

       The ngettext, dngettext and dcngettext functions attempt to
       translate a text string into the user's native language, by
       looking up the appropriate plural form of the translation in a
       message catalog.

       Plural forms are grammatical variants depending on the a number.
       Some languages have two forms, called singular and plural. Other
       languages have three forms, called singular, dual and plural.
       There are also languages with four forms.

       The ngettext, dngettext and dcngettext functions work like the
       gettext, dgettext and dcgettext functions, respectively.
       Additionally, they choose the appropriate plural form, which
       depends on the number n and the language of the message catalog
       where the translation was found.

       In the "C" locale, or if none of the used catalogs contain a
       translation for msgid, the ngettext, dngettext and dcngettext
       functions return msgid if n == 1, or msgid_plural if n != 1.

ЗНАЧЕНИЕ, ВОЗВРАЩАЕМОЕ ФУНКЦИЕЙ

       If a translation was found in one of the specified catalogs, the
       appropriate plural form is converted to the locale's codeset and
       returned. The resulting string is statically allocated and must
       not be modified or freed. Otherwise msgid or msgid_plural is
       returned, as described above.

ОШИБКИ

       errno is not modified.

НЕДОСТАТКИ

       The return type ought to be const char *, but is char * to avoid
       warnings in C code predating ANSI C.

СМОТРИТЕ ТАКЖЕ

       gettext(3), dgettext(3), dcgettext(3)

КОЛОФОН

       This page is part of the gettext (message translation) project.
       Information about the project can be found at 
       ⟨http://www.gnu.org/software/gettext/⟩.  If you have a bug report
       for this manual page, see
       ⟨http://savannah.gnu.org/projects/gettext/⟩.  This page was
       obtained from the tarball gettext-0.22.5.tar.gz fetched from
       ⟨https://ftp.gnu.org/gnu/gettext/⟩ on 2024-06-14.  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for
       the page, or you have corrections or improvements to the
       information in this COLOPHON (which is not part of the original
       manual page), send a mail to man-pages@man7.org

GNU gettext 0.22.5              May 2001                     NGETTEXT(3)

Страницы, которые ссылаются на эту страницу: bindtextdomain(3), bind_textdomain_codeset(3), gettext(3), textdomain(3), locale(7)


...
https://man7.org/linux/man-pages/man3/dngettext.3.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API