Answer the question
In order to leave comments, you need to log in
gettext - translation from Russian
I'm trying to localize texts from Russian into English using gettext.
The question arose: how to specify all forms (3 pieces) of plurals ngettext(), which accepts only 2 forms.
Yes: ngettext('%d window', '%d windows', 22) — displays %d windows
Need '%d windows'.
Answer the question
In order to leave comments, you need to log in
You will probably have to use the syntax with two forms, but create a translation file from Russian to Russian, where only plural forms are translated
:
msgid "%d a day ago"
msgid_plural "%d days ago"
msgstr[0] "%d a day ago"
msgstr[ 1] "%d days ago"
msgstr[1] "%d days ago"
Let me clarify the terminology. Now this form of the plural is referred - according to Wikipedia - to the remnants of the dual number in modern Russian . According to the philosophy of naming lines in a .po file, in your case, its contents would look something like this:
msgid "%d days ago"
msgid_dual "%d days ago"
msgid_plural "%d days ago"
msgstr[0] "%d day ago"
msgstr[1] "%d days ago"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question