Revision history  [back]

in gettext system (which is used within Django) - you need to specify in the .po file header - number of plural forms like so:

"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"$

Above there is a formula to calculate number of the plural form to use for each count. Of course number of forms and the formula will depend on the language. Turns out that Polish has four plural forms (singular + three plurals)!

Then for each translation string that needs pluralization (has msgid_plural entry) add

msgstr[0]
msgstr[1]
msgstr[2]

Most likely the first two will already be there.

After .po files are modified this way - in Django you can use rosetta app to facilitate translations. However, there will be some gotchas which will need to be fixed manually, using plain text editor.

in gettext system (which is used within Django) - you need to specify in the .po file header - number of plural forms like so:

"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"$

Above there is a formula to calculate number of the plural form to use for each count. Of course number of forms and the formula will depend on the language. Turns out that Polish has four plural forms (singular + three plurals)!

Then for each translation string that needs pluralization (has msgid_plural entry) add

msgstr[0]
msgstr[1]
msgstr[2]

Most likely the first two will already be there.

After .po files are modified this way - in Django you can use rosetta app to facilitate translations. However, there will be some gotchas which will need to be fixed manually, using plain text editor.

in gettext system - you need to specify in the .po file header - number of plural forms like so:

"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"$

Above there is a formula to calculate number of the plural form to use for each count. Of course number of forms and the formula will depend on the language. Turns out that Polish has four plural forms (singular + three plurals)!count.

Then for each translation string that needs pluralization (has msgid_plural entry) add

msgstr[0]
msgstr[1]
msgstr[2]

Most likely the first two will already be there.

After .po files are modified this way - in Django you can use rosetta app to facilitate translations. However, there will be some gotchas which will need to be fixed manually, using plain text editor.