[Bb-trac] [bbPress] #765: Localization problems when intergating

bbPress bb-trac at lists.bbpress.org
Mon Dec 17 00:20:06 GMT 2007


#765: Localization problems when intergating
-------------------------+--------------------------------------------------
 Reporter:  livibetter   |       Owner:       
     Type:  defect       |      Status:  new  
 Priority:  normal       |   Milestone:       
Component:  integration  |     Version:  0.8.3
 Severity:  normal       |    Keywords:       
-------------------------+--------------------------------------------------
 A [http://bbpress.org/forums/topic/having-trouble-integrating-wp-
 functions?replies=23 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.php`s 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?

-- 
Ticket URL: <http://trac.bbpress.org/ticket/765>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list