manpagez: man pages & more
info gettext
Home | html | info | man

File: gettext.info,  Node: Entries with Plural Forms,  Next: More Details,  Prev: Entries with Context,  Up: PO Files

3.5 Entries with Plural Forms
=============================

   A different kind of entries is used for translations which involve
plural forms.

     WHITE-SPACE
     #  TRANSLATOR-COMMENTS
     #. EXTRACTED-COMMENTS
     #: REFERENCE...
     #, FLAG...
     #| msgid PREVIOUS-UNTRANSLATED-STRING-SINGULAR
     #| msgid_plural PREVIOUS-UNTRANSLATED-STRING-PLURAL
     msgid UNTRANSLATED-STRING-SINGULAR
     msgid_plural UNTRANSLATED-STRING-PLURAL
     msgstr[0] TRANSLATED-STRING-CASE-0
     ...
     msgstr[N] TRANSLATED-STRING-CASE-N

   Such an entry can look like this:

     #: src/msgcmp.c:338 src/po-lex.c:699
     #, c-format
     msgid "found %d fatal error"
     msgid_plural "found %d fatal errors"
     msgstr[0] "s'ha trobat %d error fatal"
     msgstr[1] "s'han trobat %d errors fatals"

   Here also, a ‘msgctxt’ context can be specified before ‘msgid’, like
above.

   Here, additional kinds of sticky flags can be used:

‘range:’
     This flag is followed by a range of non-negative numbers, using the
     syntax ‘range: MINIMUM-VALUE..MAXIMUM-VALUE’.  It designates the
     possible values that the numeric parameter of the message can take.
     In some languages, translators may produce slightly better
     translations if they know that the value can only take on values
     between 0 and 10, for example.

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.