[wp-trac] [WordPress Trac] #57116: Plugin translations not loaded after calling `switch_to_locale()`
WordPress Trac
noreply at wordpress.org
Tue Dec 20 15:10:49 UTC 2022
#57116: Plugin translations not loaded after calling `switch_to_locale()`
---------------------------------------------+-------------------------
Reporter: johnbillion | Owner: swissspidy
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.1.2
Component: I18N | Version: 6.1
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+-------------------------
Changes (by swissspidy):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"55010" 55010]:
{{{
#!CommitTicketReference repository="" revision="55010"
I18N: Change how `WP_Textdomain_Registry` caches translation information.
`WP_Textdomain_Registry` was introduced in [53874] and later adjusted in
[54682] to store text domains and their language directory paths,
addressing issues with just-in-time loading of textdomains when using
locale switching and `load_*_textdomain()` functions.
This change improves how the class stores information about all existing
MO files on the site, addressing an issue where translations are not
loaded after calling `switch_to_locale()`.
Props johnbillion, ocean90, SergeyBiryukov.
Fixes #57116.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57116#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list