|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.i18n.client.impl.plurals.DefaultRule
public class DefaultRule
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.gwt.i18n.client.PluralRule |
|---|
PluralRule.PluralForm |
| Constructor Summary | |
|---|---|
DefaultRule()
|
|
| Method Summary | |
|---|---|
PluralRule.PluralForm[] |
pluralForms()
Returns the list of values which are valid for this rule. |
int |
select(int n)
Returns the plural form appropriate for this count. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRule()
| Method Detail |
|---|
public PluralRule.PluralForm[] pluralForms()
PluralRule
pluralForms in interface PluralRulepublic int select(int n)
PluralRule
select in interface PluralRulen - count of items to choose plural form for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||