Opened 4 years ago
Closed 4 years ago
#51539 closed defect (bug) (duplicate)
switch_to_locale() fails for plugins and themes not hosted on wordpress.org.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
The WP_Locale_Switcher->switch_to_locale() method relies on _load_textdomain_just_in_time(), which uses _get_path_to_translation(), which uses _get_path_to_translation_from_lang_dir(), which only returns mo file paths from WP_LANG_DIR.
If a plugin or theme is not hosted on wordpress.org, it does not have translations on wordpress.org, so switch_to_locale() fails to properly load those translation files.
js.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Duplicate of #39210.