wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_x › WordPress Function

Seit2.8.0
Veraltetn/v
_x ( $text, $context, $domain = 'default' )
Parameter: (3)
  • (string) $text Text to translate.
    Erforderlich: Ja
  • (string) $context Context information for the translators.
    Erforderlich: Ja
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Erforderlich: Nein
    Standard: 'default'
Gibt zurück:
  • (string) Translated context string without pipe.
Definiert in:
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.


Ähnliche Funktionen: _nx, _ex, _, __, _c

Quellcode

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