Fully Qualified Name: | Laminas\I18n\Translator\TextDomain |
Extends: | ArrayObject |
Text domain.
Name | Description | Defined By |
---|---|---|
getDefaultPluralRule() | Returns a shared default plural rule. | TextDomain |
getPluralRule() | Get the plural rule. | TextDomain |
hasPluralRule() | Checks whether the text domain has a plural rule. | TextDomain |
merge() | Merge another text domain with the current one. | TextDomain |
setPluralRule() | Set the plural rule | TextDomain |
Returns a shared default plural rule.
Returns: \PluralRule
Get the plural rule.
Parameter Name | Type | Description |
---|---|---|
$fallbackToDefaultRule | bool |
Returns: \PluralRule|null
Checks whether the text domain has a plural rule.
Returns: bool
Merge another text domain with the current one.
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.
Parameter Name | Type | Description |
---|---|---|
$textDomain | \TextDomain |
Returns: $this
Set the plural rule
Parameter Name | Type | Description |
---|---|---|
$rule | \PluralRule |
Returns: $this