Make WordPress Core

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)

#1 @ocean90
6 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed
  • Version 5.5.1

Duplicate of #39210.

Note: See TracTickets for help on using tickets.