yii\helpers\BaseInflector::pluralize PHP Method

pluralize() public static method

Note that this is for English only! For example, 'apple' will become 'apples', and 'child' will become 'children'.
public static pluralize ( string $word ) : string
$word string the word to be pluralized
return string the pluralized word
    public static function pluralize($word)
    {
        if (isset(static::$specials[$word])) {
            return static::$specials[$word];
        }
        foreach (static::$plurals as $rule => $replacement) {
            if (preg_match($rule, $word)) {
                return preg_replace($rule, $replacement, $word);
            }
        }
        return $word;
    }