Text domain.

package Default

 Methods

Returns a shared default plural rule.

getDefaultPluralRule() : \Zend\I18n\Translator\Plural\Rule
Static

Returns

\Zend\I18n\Translator\Plural\Rule

Get the plural rule.

getPluralRule(boolean $fallbackToDefaultRule = true) : \Zend\I18n\Translator\Plural\Rule | null

Parameters

$fallbackToDefaultRule

boolean

Returns

\Zend\I18n\Translator\Plural\Rulenull

Checks whether the text domain has a plural rule.

hasPluralRule() : boolean

Returns

boolean

Merge another text domain with the current one.

merge(\Zend\I18n\Translator\TextDomain $textDomain) : \Zend\I18n\Translator\TextDomain

The plural rule of both text domains must be compatible for a successful merge. We are only validating the number of plural forms though, as the same rule could be made up with different expression.

Parameters

$textDomain

\Zend\I18n\Translator\TextDomain

Exceptions

\Zend\I18n\Exception\RuntimeException

Returns

\Zend\I18n\Translator\TextDomain

Set the plural rule

setPluralRule(\Zend\I18n\Translator\Plural\Rule $rule) : \Zend\I18n\Translator\TextDomain

Parameters

$rule

\Zend\I18n\Translator\Plural\Rule

Returns

\Zend\I18n\Translator\TextDomain

 Properties

 

Default plural rule shared between instances.

$defaultPluralRule : \Zend\I18n\Translator\Plural\Rule

Default

Static
 

Plural rule.

$pluralRule : \Zend\I18n\Translator\Plural\Rule

Default