Plural forms for your language
Moderator: Forum Moderators
- vonHalenbach
- Translator
- Posts: 398
- Joined: May 3rd, 2006, 10:23 am
- Location: united europe
Plural forms for your language
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?
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.
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
I added it to http://www.wesnoth.org/wiki/GettextForTranslators
Re: Plural forms for your language
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:
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.
Here is an example for the Italian language:
Code: Select all
msginit -i original.po -o italian.po -l it_IT
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.
Re: Plural forms for your language
Good point about PoEdit. Virtaal does he same job - open the .pot, select your language pair, save as .po, done.