WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/14/2010 09:46:25 PM (11 years ago)
Author:
nacin
Message:

Introduce _ex(), a hybrid between _e() and _x() -- translate with context, then echo. props westi, see #13395.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r14456 r14647  
    189189function _x( $single, $context, $domain = 'default' ) {
    190190    return translate_with_gettext_context( $single, $context, $domain );
     191}
     192
     193/**
     194 * Displays translated string with gettext context
     195 *
     196 * @see _x
     197 * @since 3.0.0
     198 *
     199 * @param string $text Text to translate
     200 * @param string $context Context information for the translators
     201 * @param string $domain Optional. Domain to retrieve the translated text
     202 * @return string Translated context string without pipe
     203 */
     204function _ex( $single, $context, $domain = 'default' ) {
     205    echo _x( $single, $context, $domain );
    191206}
    192207
Note: See TracChangeset for help on using the changeset viewer.