# Smart.Plurals

This library provides language rules for determining if a number is **singular** or **plural**, or in some languages,
 **dual** and other arrangements.
 [See more about Grammatical Numbers](http://en.wikipedia.org/wiki/Grammatical_number)

## Smart.Plurals API

| Smart.Plurals Method                              | Description |
| ------------------------------------------------- | ----------- |
| `getRule()`                                       | Returns the default plural rule |
| `getRule(languageCode)`                           | Looks up the plural rule for the language code. |
| `setDefaultRule(languageCode)`                    | Sets the default plural rule |
| `defineRule(ruleName, pluralRule)`                | Defines a plural rule |
| `defineLanguageCodes(languageCodes, ruleName)`    | Defines a mapping between language codes and plural rules |


## References

General information about Grammatical Numbers
http://en.wikipedia.org/wiki/Grammatical_number

Much of this language information came from the following url:
http://www.gnu.org/s/hello/manual/gettext/Plural-forms.html

The language codes came from:
http://www.loc.gov/standards/iso639-2/php/code_list.php
