Uma área de pesquisa sobre o WordPress para devs e autores do tema



_x ›

Desde2.8.0
Obsoleton/a
_x ( $text, $context, $domain = 'default' )
Parâmetros: (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
    Padrão: 'default'
Retorna:
  • (string) Translated context string without pipe.
Definido em:
Codex:

Retrieve 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.



Funções relacionadas: _nx, _ex, _, is_tax, __

Fonte

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