PluralizationRules

PluralizationRules

class PluralizationRules

Returns the plural rules for a given locale.

Methods

static int get(int $number, string $locale)

Returns the plural position to use for the given locale and number.

static set(callable $rule, string $locale)

Overrides the default plural rule for a given locale.

Details

static int get(int $number, string $locale)

Returns the plural position to use for the given locale and number.

Parameters

int $number The number
string $locale The locale

Return Value

int The plural position

static set(callable $rule, string $locale)

Overrides the default plural rule for a given locale.

Parameters

callable $rule A PHP callable
string $locale The locale

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Translation/PluralizationRules.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部