[wp-hackers] Improvements to the WordPress l10n framework
Nikolay Bachiyski
nbachiyski at developer.bg
Sat May 12 18:33:05 GMT 2007
Hello guys,
I was thinking for a long time of this problem and was on the verge of
raising the issue in front of you all, but somebody got here first :-)
If we are to summarize our goal: the plugin developers should not have
to write their gettext domain name in every __/_e call.
2007/5/12, Omry Yadan <omry at yadan.net>:
> the idea is the code that initializes the plugins initialize a global
> called $plugin_id before calling the plugin init code.
> when the plugin adds an action, it will pass that global to the
> add_action function, that will use it to re-obtain context when calling
> the actions.
We cannot do this. What happens if the plugin function calls a core
function and then it calls other plugin function? It is possible that
either core strings are being searched for in the plugin domain or,
worse, one plugin\s string is being looked for in other plugin's
domain.
Given that PHP lacks namespaces the task just cannot be accomplished easily.
Happy hacking,
Nikolay.
More information about the wp-hackers
mailing list