Opened 6 years ago
Closed 6 years ago
#51539 closed defect (bug) (duplicate)
switch_to_locale() fails for plugins and themes not hosted on wordpress.org.
| Reported by: | jsmoriss | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #39210.