Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_x [ WordPress Function ]

_x ( $text, $context, $domain = 'default' )
Parameters:
  • (string) $text Text to translate
  • (string) $context Context information for the translators
  • (string) $domain Optional. Domain to retrieve the translated text
Returns:
  • (string) Translated context string without pipe
Defined at:

Soorgelijke functies: _nx, _ex, _, is_tax, __


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.

Source


<?php
function _x$text$context$domain 'default' ) {
    return 
translate_with_gettext_context$text$context$domain );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics