Codex tools: Log in
Contents |
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.
<?php _x( $text, $context, $domain ) ?>
_x() is located in wp-includes/l10n.php.
L10n: translate(), __(), _e(), _n(), _x(), _ex(), _nx(), esc_attr__(), esc_attr_e(), esc_attr_x(), esc_html__(), esc_html_e(), esc_html_x(), _n_noop(), _nx_noop(), translate_nooped_plural()