start
Table of Contents

Plurals

Believe it or not some langauges have more than one plural form. This fact does come as a surprise to many, especially programmers.

There are two aspects to plurals that you need to be aware of:

  1. Those ebedded in existing string eg. “file(s)”
  2. Properly defined plurals forms

Plurals embedded in strings

English adds s to the end of most words to form a plural. Thus you will see many instances where a programmer has simply add (s) to the word to indicate that it can be both simgular and plural. Here is an example in Tsonga, in this case plurals add/change text at the beginning of the word, not the end. This often simply looks ugly.

"Show/Hide Axis Description(s)"
"Kombisa/Fihla (Ti)Nhlamuselo ya Tikhona"

Here are the options available to you to deal with these type of plurals:

  1. Use a similar construct if it works in your language
  2. Abandon the singular and use only the plural form. This is what is done in Xhosa where a singular/plural form often involves prefixes so you end up with “(i)ifalyile” or worse. So you simply use the plural “iifayile”
  3. Report the error to the programmer. Only use this option if this is the case for a valid plural ie the translator has used some kind of variable eg “%n file(s)” or two strings follow each other “%n file”, “%n files”

Properly defined plural forms

Program do have the ability handle plurals correctly. There are two ways in which plurals are defined the Gettext method and the KDE method. When the application runs it will determine which plural form to use based on the number that is being displayed. So in English it would display:

Gettext plurals

Gettext uses the “Plural-Forms” header in the PO file to define:

Once this is defined then your PO editing tool will display the correct number of fields for you to enter the plural forms.

To find out how to define these entries, see Plural forms (gettext manual)

KDE plurals

The plural form for KDE is defined in the kdelibs.po file. Choose one of the options or ask for help on their mailing list.

You will recongnise KDE plural messages as they all start with “_n: ” and each form is seperate by “\n“. in your translation you leave out the “_n: ” and include as many translations as there are plural forms in your language, with each one seperated by a “\n

Language specific notes