[wp-trac] [WordPress Trac] #17128: POMO library performance considerations

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 22 14:58:29 UTC 2012


#17128: POMO library performance considerations
-------------------------+-----------------------------
 Reporter:  wet          |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------------

Comment (by rulatir):

 The if can be avoided the same way we currently avoid checking if the .mo
 file was there in the first place for the given domain: if translations
 for a domain are not available, the framework creates an instance of
 NOOP_Translations, rather than Gettext_Translations, see l10n.php:499. We
 could use the same pattern for on-demand loading: we could write
 Textdomain_Loader, another implementation of the Translations() interface,
 and instantiate it where we now instantiate Gettext_Translations.
 Textdomain_Loader::translate() would do the actual loading and change the
 global reference to point to the newly crated MO object.

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


More information about the wp-trac mailing list