WordPress at a glance

_ex{} WP 3.0.0

Displays translated text (string) with specified context.

This function simply displays what _x() retrieve. For more detailed information about context translation, see the description of _x().

Works based on: _x()
✈ 1 time = 0.00004s = very fast | 50000 times = 0.14s = very fast PHP 7.1.2, WP 4.7.3

No Hooks.

Return

Nothing (null). Displays translated text or original text if the string could not be translated.

Usage

<?php _ex( $text, $context, $domain ); ?>
$text(string) (required)
Text to translate.
$context(string) (required)
Context information for the translators.
$domain(string)
Text domain. Unique identifier for retrieving translated strings.
Default: 'default'

Examples

#1 Display the translated string in the specified context

Here translates the string Format in the context of post format.

<?php _ex( 'Format', 'post format', 'text_domain' ); ?>

Now, for example, if we translate to Russian, this code will display the translation of Format > Формат.

Code of _ex: wp-includes/l10n.php VER 4.9.8

<?php
function _ex( $text, $context, $domain = 'default' ) {
	echo _x( $text, $context, $domain );
}

Related Functions

From tag: localize (l10n i18n Internationalization localization)

More from category: Localization

No comments
    Hello, !     Log In . Register