There is a lot of languages like that, most have 3 plural forms, but there are some languages that have 4 and one (at least the only I know) has 5 different plural forms. All the languages have different rules for applying the correct plural form. The only translation system that supports this correctly is the gnu gettext that is used by many OSS projects. There is a version for Delphi/C++ builder - dxgettext
. The translation files contain a string used to determine the correct plural form, for my language (Czech, and it definitely isn't the most complicated) it looks like this:
nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
This means that my language has 3 plural forms, one for 1, the second for 2, 3, 4 and the third for 0 and the rest. For strings where there are any plurals, the translation file contains all the variants, ie:
msgid "%s file"
msgid_plural "%s files"
msgstr "%s soubor"
msgstr "%s soubory"
msgstr "%s souborů"
and the correct one is selected at runtime depending on the value of the variable in the string. With the example with files, the translation would be:
0 files - 0 souborů
1 file - 1 soubor
2 (3, 4) files - 2 (3, 4) soubory
5 files - 5 souborů