It would be preferable to integrate this system of equations, avoiding incorrect translations. I do not know if it is easy to implement because we're not using PO/MO and it looks complex, or if this system is the best, but the actual string system is not sufficient with some languages, like Bosnian:kenan3008 wrote:I have one problem with plural forms. As you already know, situation with singular and plural forms in English is quite simple. One of something is singular and everything above that is plural. In Bosnian (like in most Slavic languages), we have a more complex situation. Here is an example:
Bosnian word for elephant is "slon".
English: 1 elephant, 2 elephants, 3 elephants etc. (stupid example )
Bosnian:
for numbers 0,5,6 and those ending with these numbers (like 25):
0 slonova, 5 slonova, 6 slonova
for numbers 2,3,4 and those ending with these numbers (like 22):
2 slona, 3 slona, 4 slona
for numbers 1,21,31,... :
1 slon, 21 slon, 31, slon
In software that uses PO/MO architecture this is solved by adding an equation for plural forms (for example, WordPress uses that system). For Bosnian, this equation is:
nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)
where n is the number of something. Complete list of languages and their plural forms is available here: http://translate.sourceforge.net/wiki/l10n/pluralforms
After adding this equation, I get three rows for every string that has plural form and I am able to type in everything correctly. Depending on the number that is displayed in the string, one of these three translations is pulled and displayed to the user. Is it possible to implement something like that into phpBB's translation?
Code: Select all
// Nullar/Singular/Plural language entry. The key numbers define the number range in which a certain grammatical expression is valid.
'NUM_POSTS_IN_QUEUE' => array(
0 => 'No posts in queue', // 0
1 => '1 post in queue', // 1
2 => '%d posts in queue', // 2+
),
Ticket
Pull request