diff options
Diffstat (limited to 'wp-includes/l10n.php')
-rw-r--r-- | wp-includes/l10n.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 4a0a640..0847ea3 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -37,6 +37,21 @@ function _e($text, $domain = 'default') { echo $text; } +function _c($text, $domain = 'default') { + global $l10n; + + if ( isset($l10n[$domain]) ) + $whole = apply_filters('gettext', $l10n[$domain]->translate($text), $text); + else + $whole = $text; + + $trans = explode('|', $whole, 2); + if ( isset( $trans[1] ) ) + return $trans[1]; + else + return $trans[0]; +} + // Return the plural form. function __ngettext($single, $plural, $number, $domain = 'default') { global $l10n; |