SpanishInflection 0.0.2

SpanishInflection 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Sep 2015

Maintained by Héctor Marqués.



Spanish inflection rules for InflectorKit.

TTTStringInflector *inflector = [[TTTStringInflector alloc] init];
[inflector addPluralizationRulesForEsESLocale];

NSLog(@"%@", [inflector pluralize:@"usuario"]);
NSLog(@"%@", [inflector singularize:@"comentarios"]);

If you want to customize which rules should be added to the inflector and in which order (e.g. you only want rules for making the plural), you can use any convination of the following methods instead of addPluralizationRulesForEsESLocale:

- (void)addSingularRulesForEsESLocale;
- (void)addPluralRulesForEsESLocale;
- (void)addIrregularsForEsESLocale;
- (void)addInvariantsForEsESLocale;
- (void)addUncontablesForEsESLocale;

Usage

The SpanishInflection.xcodeproj does not provide an example application, but a set of tests that demonstrate how you use TTTStringInflector+Spanish category.

To run the SpanishInflectionTests target fetch submodules first.

Installation

Manually

Perform the following steps:

  • Add the InflectorKit library into your project.

  • Copy SpanishInflection directory into your project.

License

SpanishInflection is available under the MIT license. See the LICENSE file for more info.