public static class DefaultRule
extends Object
Default implementation of plural rules. The i18n generator will
substitute subclasses of this class, which may reside anywhere in
the package hierarchy, based on the locale. See Localizable
for more details on this process.
The default implementation here always selects the default form.
To define a new language, simply declare a subclass of this class
that is named with the locale you want to specify, such as
DefaultRule_en_uk for English spoken in the UK (note the lower-cased
tag).
This is an implementation of the language pluralization rules described
at http://translate.sourceforge.net/wiki/l10n/pluralforms
Eventually, all these rules will be machine generated from Unicode's
CLDR, perhaps with some additional data that isn't kept there if
necessary. The current subclasses are defined just to get reasonable
plural support for most of the common languages -- in particular, you
should not rely on particular keywords for the plural forms of a
given language.
- See Also:
- Serialized Form