Latest 0.0.2
Homepage https://github.com/hectr/SpanishInflection
License MIT
Platforms ios , requires ARC
Dependencies InflectorKit
Authors

Build Status
Version
License
Platform

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

CocoaPods

SpanishInflection is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "SpanishInflection"

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.

Latest podspec

{
    "name": "SpanishInflection",
    "version": "0.0.2",
    "summary": "Spanish rules for InflectorKit.",
    "description": "Spanish inflection rules for **[InflectorKit](https://www.github.com/mattt/InflectorKit)**.",
    "homepage": "https://github.com/hectr/SpanishInflection",
    "license": "MIT",
    "authors": {
        "hectr": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hectr/SpanishInflection.git",
        "tag": "0.0.2"
    },
    "social_media_url": "https://twitter.com/hectormarquesra",
    "platforms": {
        "ios": null
    },
    "requires_arc": true,
    "source_files": "SpanishInflection",
    "dependencies": {
        "InflectorKit": [
            "~> 0.0.1"
        ]
    }
}

Pin It on Pinterest

Share This