original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Changes the form of a word .