WordPress.org

Make WordPress Core

Ticket #3687: with-desc.diff

File with-desc.diff, 563 bytes (added by nbachiyski, 15 years ago)
  • wp-includes/l10n.php

     
    5151        }
    5252}
    5353
     54// Translatable string and its description, separated by |
     55function __withdesc($text, $domain = 'default') {
     56        $whole = __($text, $domain);
     57        $trans = explode('|', $whole, 2);
     58        return $trans[0];
     59}
     60
     61function _ewithdesc($text, $domain = 'default') {
     62        echo __withdesc($text, $domain);
     63}
     64
    5465function load_textdomain($domain, $mofile) {
    5566        global $l10n;
    5667