[TYPO3-v4] [XLIFF] Support plurals
Jigal van Hemert
jigal at xs4all.nl
Wed Dec 14 11:23:01 CET 2011
Hi,
On 14-12-2011 10:06, Xavier Perseguers wrote:
> The answer will be easy once we implement the last bits of
> what XLIFF really could bring us: support for plurals.
Interesting subject: "plurals". It has some challenging concepts in
various languages [1]. Something we (partly) need to implement in this
feature.
Singular, plural, ....?
-----------------------
Many languages have dual (two), trial (three), paucal (a few) numbers. A
few of the supported languages (Solvenian, Arabic, ...) have dual forms.
Even English has traces ( one, both, all ) of dual forms.
Polish has a different form for numbers where the last digit is 2, 3 or
4 (but not 12, 13 and 14). Other (supported) languages have similar rules.
Zero
----------------------
Another challenge is handling zero. English, Dutch, German, etc. use
plural for zero items; French uses singular.
Multiple plurals (or combination of other forms)
------------------------------------------------
We have labels with multiple place holders. What if more than one place
holder (number) influences the plural form?
"Result: %$1d items shown (%$2d items hidden)"
Now we have 2 counts that influence the form. Together with duals, etc.
it can be quite challenging to determine which label must be used.
Should we have this?
One could argue that we currently don't have any support for plurals and
any improvement is a step forward. On the other hand, if it isn't done
properly from the beginning it is very unlikely that it will ever be
improved in the future.
Pootle seems to have support for this [2], but I doubt that it can
handle combined plurals.
My proposal:
- implement use of plurals for xliff
- make sure Pootle handles plurals correctly for specific languages
(duals, etc.)
- don't support multiple/combined plurals
- don't implement replacements (simply because there is no standard way
replacement is done yet; even in the core there are different forms:
some use sprint syntax, other cases use {varname}, etc.)
[1] http://en.wikipedia.org/wiki/Plural
[2] http://translate.sourceforge.net/wiki/l10n/pluralforms
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
More information about the TYPO3-project-v4
mailing list