protected static function _inflectize($rules, $word, $locale)
    {
        if (!$word || !isset($rules[$locale])) {
            return $word;
        }
        $result = $word;
        foreach ($rules[$locale] as $rule => $replacement) {
            $result = preg_replace($rule, $replacement, $word, -1, $count);
            if ($count) {
                return $result;
            }
        }
        return $result;
    }
protected static function _inflectize($rules, $word, $locale)
    {
        if (!$word || !isset($rules[$locale])) {
            return $word;
        }
        $result = $word;
        foreach ($rules[$locale] as $rule => $replacement) {
            $result = preg_replace($rule, $replacement, $word, -1, $count);
            if ($count) {
                return $result;
            }
        }
        return $result;
    }
protected static function _inflectize ( $ rules , $ word , $ locale ) { if ( ! $ word || ! isset ( $ rules [ $ locale ] ) ) { return $ word ; } $ result = $ word ; foreach ( $ rules [ $ locale ] as $ rule => $ replacement ) { $ result = preg_replace ( $ rule , $ replacement , $ word , - 1 , $ count ) ; if ( $ count ) { return $ result ; } } return $ result ; }
Changes the form of a word.

@param  string $rules  The inflection rules array.
@param  string $word   A word.
@param  string $locale The locale to use for rules.
@return string         The inflectized word.
Changes the form of a word .