WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 8 weeks ago

#23721 closed enhancement (worksforme)

Better control of textdomains.

Reported by: krembo99 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 .

Change History (2)

comment:1 knutsp14 months ago

  • Cc knut@… added

comment:2 ocean908 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hello krembo99, sorry you never got a response.

If a user need a plugin/ theme that does not have a 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 .

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 and load_textdomain_mofile.

Note: See TracTickets for help on using tickets.