[wp-trac] [WordPress Trac] #34114: Remove the requirement to call load_plugin_textdomain() or load_theme_textdomain()
WordPress Trac
noreply at wordpress.org
Thu Oct 1 14:22:43 UTC 2015
#34114: Remove the requirement to call load_plugin_textdomain() or
load_theme_textdomain()
-------------------------+--------------------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version:
Severity: normal | Keywords: needs-patch dev-feedback
Focuses: |
-------------------------+--------------------------------------
In the near future we'll start to see some plugins and themes which do not
bundle any translations, instead relying on all translations being powered
by language packs from translate.wordpress.org. In this situation, the
`load_[plugin|theme]_textdomain()` call falls back to the
`WP_LANG_DIR/[plugins|themes]` directory.
It makes sense then that the requirement for such a plugin or theme to
call `load_[plugin|theme]_textdomain()` could be removed, because the
translation now lives in one of two known locations, and as long as MO
files were loaded JIT.
The first time core encounters a localised string with a textdomain that
has not already been loaded, it should look for a corresponding MO file
first in the `WP_LANG_DIR/plugins` directory and then in the
`WP_LANG_DIR/themes` directory, and load it if it's found.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34114>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list