Opened 12 years ago
Closed 11 years ago
#23721 closed enhancement (worksforme)
Better control of textdomains.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
At the current state , loading a text domain is done by the plugin/theme author , and leaves no control to the user / other devs to intervene with this process. we are left to the mercy and good will of the original author .
It would be a good thing to create some HOOK or ACTION that will allow a user to override this somehow.
At the very least (and maybe it should be a different ticket) a function that will return all available $domain names and paths should be made available (currently no way of retrieving that but parsing the $i18n global)
Example : If a user need a plugin/ theme that does not have a translation for my desired language , or a BAD translation (or no translation at all) the user then creates it´s OWN translation, and by dropping it inside wp-content/languages folder , that translation will be loaded instead of the one supplied (or not supplied ) with the original plugin / theme .
Current state : If a user loads a translation to the original plugin folder for translations, it will be deleted upon first update .
Hello krembo99, sorry you never got a response.
With [22346] for themes and [25059] for plugins this is now possible.
There are already also some hooks in
load_textdomain()
which you can use:override_load_textdomain
,load_textdomain
andload_textdomain_mofile
.