_x()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
_x( string $text, string $context, string $domain = 'default' ): string
Описание
Довольно часто возникают коллизии, когда похожий переводимый текст встречается более чем в двух местах, но с разным контекстом перевода.
Включив контекст в pot-файл, переводчики могут перевести эти строки по-разному.
Оригинал (английский)
Quite a few times, there will be collisions with similar translatable text found in more than two places, but with different translated context.
By including the context in the pot file, translators can translate the two strings differently.
Параметры
$text
string
обязательный
$context
string
обязательный
$domain
string
необязательный
= 'default'
Возвращаемое значение
string
Исходный код
wp-includes/l10n.php:409
function _x( $text, $context, $domain = 'default' ) {
return translate_with_gettext_context( $text, $context, $domain );
}
История изменений
| Версия | Описание |
|---|---|
| 2.8.0 | Introduced. |

