[wp-trac] [WordPress Trac] #10527: load_textdomain() merges even if not needed.

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 14 12:37:48 UTC 2009


#10527: load_textdomain() merges even if not needed.
-------------------------+--------------------------------------------------
 Reporter:  hakre        |       Owner:  nbachiyski                  
     Type:  enhancement  |      Status:  new                         
 Priority:  normal       |   Milestone:  2.9                         
Component:  i18n         |     Version:  2.8.1                       
 Severity:  normal       |    Keywords:  has-patch tested 2nd-opinion
-------------------------+--------------------------------------------------

Comment(by hakre):

 For those who are looking for a workaround for their plugins, this is a
 tested piece of code that has a shortcomming in using the global directly
 but it's working. Can be used in a plugin's function or class:

 {{{
 global $l10n;
 $domain = 'pluginstextdomain';
 if (!isset( $l10n[$domain] ))
 {
         load_plugin_textdomain($domain, false, 'path_to/languages');
 }
 }}}

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


More information about the wp-trac mailing list