[wp-trac] [WordPress Trac] #34114: Remove the requirement to call load_plugin_textdomain() or load_theme_textdomain()

WordPress Trac noreply at wordpress.org
Thu Apr 21 20:44:17 UTC 2016


#34114: Remove the requirement to call load_plugin_textdomain() or
load_theme_textdomain()
---------------------------------------------------+------------------
 Reporter:  johnbillion                            |       Owner:
     Type:  enhancement                            |      Status:  new
 Priority:  normal                                 |   Milestone:  4.6
Component:  I18N                                   |     Version:
 Severity:  normal                                 |  Resolution:
 Keywords:  dev-feedback has-patch has-unit-tests  |     Focuses:
---------------------------------------------------+------------------

Comment (by giuseppe.mazzapica):

 Replying to [comment:12 ocean90]:
 > Replying to [comment:11 giuseppe.mazzapica]:
 > > Am I wrong or with your patch there will be no way to load a language
 file from plugin / theme folder if there's a file for that domain in
 either plugins or themes language folder?
 >
 > If you want to load the files from another folder you still have to use
 load_plugin_textdomain() or load_theme_textdomain(). This ticket is about
 an enhancement for plugins/themes which are using language packs.

 Seems I misread the patch.. For some reason I was convinced that the line

 ` if ( load_textdomain_just_in_time( $domain ) || isset( $l10n[ $domain ]
 ) ) { `

 was part of `load_plugin_textdomain`... but actually is for
 `get_translations_for_domain`...

 facepalm

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34114#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list