Localization problems when intergating
|Reported by:||livibetter||Owned by:|
|Component:||General - Integration||Keywords:|
A post shows the problems. Should be fixed in the core.
When integrating, WordPress loads first, then bbPress. libraries stream.php and gettext.php are not the problem. But both l10n.phps are. WordPress loads first, so those functions in l10n.php will be WordPress's version. Then when try to load a .mo will search in WordPress' directories only.
For bbPress Plugins:
If it runs load_plugin_textdomain() without path, then the language file may not be found. Maybe a bb_load_plugin_textdomain would be better?
For bbPress own language file:
load_default_textdomain won't work for bbPress. First, it uses same textdomain default as WordPress does. Second, even bbPress use different textdomain, the gettext functions __ and _e still can't recognize who is calling it? WordPress or bbPress?
A silly solution is to add bb__ and bb_e. But needs to change many codes.
If we can merge bbPress' translation into WordPress' translation in runtime, that might work smoothly.
Or modify __ and _e of WordPress, when get default textdomain for searching, search in bbPress' translations first, then WordPress' translation if can't find. But this will need to change WordPress code.
Maybe I just think too much? There is already a quick and simple solution?