Plural forms for your language

Discuss and coordinate development of mainline and user-made content translations.

Moderator: Forum Moderators

Post Reply
User avatar
vonHalenbach
Translator
Posts: 398
Joined: May 3rd, 2006, 10:23 am
Location: united europe

Plural forms for your language

Post by vonHalenbach »

Hello translators!

I have found a list of Plural-forms for many languages, which might get useful for you.

Here in Battle for Wesnoth those lines of plural-forms in the po-files seem correct for the languages we currently have. If your language is still not there, please contact the maintainer of this list to update with your plural definion.

http://translate.sourceforge.net/wiki/l10n/pluralforms



Could a moderator stickify this?
Last edited by vonHalenbach on January 16th, 2008, 8:36 pm, edited 1 time in total.
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

User avatar
Nobun
Code Contributor
Posts: 129
Joined: May 4th, 2009, 9:28 pm
Location: Italy

Re: Plural forms for your language

Post by Nobun »

The easier way to set up the right plural form for your language is to use the 'msginit' gettext tool

Here is an example for the Italian language:

Code: Select all

msginit -i original.po -o italian.po -l it_IT
The last value is the localization code you want to use (it_IT for Italian and so on).
The new pot file not only will have the right nplurals value setted on the pot header info, but also will have the right number of msgstr[X] where plural form is used.

For example, on Italian language (like english) you will have only msgstr[0] and msgstr[1] (becouse italian has only two kinds of singular/plural form... [0] in that case is used for singular and [1] for plural).

But other languages could have only ONE form (no plural form at all) and they will have only msgstr[0].
Or they can have more than two forms (for example three)... And in that case, every string with plural form will have msgstr[0], msgstr[1], msgstr[2].... and so on.

It is not suggested, instead, to edit those values by hand.

NOTE: under windows, msginit can be obtained downloading PoEdit, wich contains all the gettext tools .exe under a subdirectory where PoEdit was installed.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Plural forms for your language

Post by GunChleoc »

Good point about PoEdit. Virtaal does he same job - open the .pot, select your language pair, save as .po, done.
Post Reply