wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



_x › WordPress Function

Depuis2.8.0
Dépréciéen/a
_x ( $text, $context, $domain = 'default' )
Paramètres: (3)
  • (string) $text Text to translate.
    Requis: Oui
  • (string) $context Context information for the translators.
    Requis: Oui
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Requis: Non
    Défaut: 'default'
Retourne:
  • (string) Translated context string without pipe.
Défini(e) dans:
Codex:

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.


Fonctions en relation: _nx, _ex, _, __, _c

Source

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