Opened 10 years ago
Closed 10 years ago
#37113 closed defect (bug) (fixed)
unload_textdomain() not working for text domains that are loaded just in time
| Reported by: | swissspidy | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.6 |
| Component: | General | Version: | 4.6 |
| Severity: | normal | Keywords: | has-unit-tests has-patch |
| Cc: | Focuses: |
Description (last modified by )
#34114 removed the requirement to call load_plugin_textdomain() or load_theme_textdomain() by checking the languages directory for available translation files.
However, as pointed out by @opajaap in the support forums, unload_textdomain() does not work anymore because of that. _load_textdomain_just_in_time() would simply load the text domain again and again.
We need some sorts of global array to keep track of unloaded text domains, which _load_textdomain_just_in_time() would ignore. Unloaded text domains would need to be loaded explicitly if one wants to use it again — like before.
Will whip up a patch shortly.
Attachments (4)
Change History (10)
#5
@
10 years ago
37113.2.diff extends load_textdomain() to clear unloaded domains from the $l10n_unloaded array so they can be manually loaded again.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Allow manual reloading of text domains