class MessageSelector (View source)

Methods

mixed
choose(string $line, int $number, string $locale)

Select a proper translation string based on the given number.

int
getPluralIndex(string $locale, int $number)

Get the index to use for pluralization.

Details

mixed choose(string $line, int $number, string $locale)

Select a proper translation string based on the given number.

Parameters

string $line
int $number
string $locale

Return Value

mixed

int getPluralIndex(string $locale, int $number)

Get the index to use for pluralization.

The plural rules are derived from code of the Zend Framework (2010-09-25), which is subject to the new BSD license (https://framework.zend.com/license) Copyright (c) 2005-2010 - Zend Technologies USA Inc. (http://www.zend.com)

Parameters

string $locale
int $number

Return Value

int