Core Function
View Source on Trac ↗ _nx()
_nx(
mixed $single,
mixed $plural,
mixed $number,
mixed $context,
mixed $domain = 'default'
) Translates and retrieves the singular or plural form based on the supplied number, with gettext context.
Parameters 5 required
| Name / Type | Description |
|---|---|
| $single string | The text to be used if the number is singular. Required |
| $plural string | The text to be used if the number is plural. Required |
| $number int | The number to compare against to use either the singular or plural form. Required |
| $context string | Context information for the translators. Required |
| string | $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'. Required |
Return Value
(string)
The translated singular or plural form.
Function Information
Since Version
2.8.0
Source File
wp-includes/l10n.php
Advertisement