[wp-trac] Re: [WordPress Trac] #9673: sprintf() shortcuts

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 29 07:23:02 GMT 2009


#9673: sprintf() shortcuts
-------------------------+--------------------------------------------------
 Reporter:  wnorris      |       Owner:  nbachiyski
     Type:  enhancement  |      Status:  new       
 Priority:  normal       |   Milestone:  Unassigned
Component:  i18n         |     Version:  2.8       
 Severity:  normal       |    Keywords:  i18n      
-------------------------+--------------------------------------------------

Comment(by filosofo):

 Why not make all these l10n functions into comparable object methods, and
 then set the domain as an object property?  Then you could do something
 like the following:

 {{{
 $my_l10n = new WP_L10n('my-domain');
 $my_l10n->_f('Author is %s', array($author))
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9673#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list