Jean-Marc Desperrier napisał(a):
> Is it some js, that must be added in the localisation, or an XPCOM
> component ?
The localization would only need to provide the plural forms expression
that decides which plural form is correct for a specific number.
> Maybe the nicest is an XPCOM component, that you can choose
> to code in js, or in low level language when that is more adapted.
Probably, yes.
But I suppose a getFormattedPluralString method next to
getString and getFormattedString would be the most natural place for
this.
> Or, well maybe we should include in the i18n code a table driven plural
> chooser, and the l10n provides the tables so that we solve the
> performance problem.
What do you mean by "table driven plural chooser"?
> If it's *really* complex, there could be a way by
> which the localisation provide it's own XPCOM implementation to call.
XPCOM component is not something that a localization team (often
consisting of non-techies) should provide. They should only provide the
plural forms expression, like for gettext, and preferably it should be
the same expression as in gettext, like these:
http://www.wordforge.org/static/l10n-pluralforms.html(note: I don't know how accurate this page is, however it seems OK for
English, Germand and Polish)
--
Marek Stępień <
marcoos@...>
AviaryPL - polski zespół lokalizacyjny Mozilli
http://www.firefox.pl/ |
http://www.mozilla.org.pl/_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n