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:

Benzer Fonksiyonlar: _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 ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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