[wp-trac] [WordPress Trac] #57116: Plugin translations not loaded after calling `switch_to_locale()`

WordPress Trac noreply at wordpress.org
Wed Nov 16 11:46:46 UTC 2022


#57116: Plugin translations not loaded after calling `switch_to_locale()`
--------------------------+------------------------------
 Reporter:  johnbillion   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:  6.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by swissspidy):

 Haven't checked yet, but this might have to do with using
 `load_plugin_textdomain()` but not having any actual translation files in
 the `languages` folder:

 https://github.com/johnbillion/user-
 switching/blob/ccbc248a1e5f9db44e207f7113c96dbe409c14ac/user-
 switching.php#L168

 Does the switching work once you remove that call?

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


More information about the wp-trac mailing list