wpseek.com
WordPress开发者和主题制作者的搜索引擎



_x › WordPress Function

Since2.8.0
已弃用n/a
_x ( $text, $context, $domain = 'default' )
参数: (3)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $context Context information for the translators.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    默认: 'default'
返回:
  • (string) Translated context string without pipe.
定义在:
文档:

Retrieves translated string with gettext context.

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.


Related Functions: _nx, _ex, _, __, _c

源码

function _x( $text, $context, $domain = 'default' ) {
	return translate_with_gettext_context( $text, $context, $domain );
}