wordpress integrate problem when enable BBLANG
-
Today I am integreating wordpress and bbpress, it’s works fine, but after I set BBLANG to my language(zh_TW), this message below shows up.
“Fatal error: Cannot redeclare class streamreader in /path/to/bbpress/bb-includes/streams.php on line 26”
Coz StreamReader class has been declared in wordpress, but bbpress will declare it again in ‘bb-settings.php’, this coz the error.
here is the code in ‘bb-settings.php’
Code:include_once(BBPATH . BBINC . ‘streams.php’);
include_once(BBPATH . BBINC . ‘gettext.php’);I use class_exists to avoid these two files, ‘streams.php’ and ‘gettext.php’ to be include twice.
the code came into these:
Code:if (!class_exists(‘StreamReader’))
include_once(BBPATH . BBINC . ‘streams.php’);if (!class_exists(‘gettext_reader’))
include_once(BBPATH . BBINC . ‘gettext.php’);then it works! bbpress came back to normal, but my language file seems not to be loaded.
After all, I find out, that bbpress uses wordpress function after integrate, so I place my .mo file into /path/to/wordpress/wp-includes/languages/ , then, my language file finally loaded. but ….. here is another problem, the .po of wordpress and bbpress will mess up into one file. but I want my wordpress not to be translated. ><
- You must be logged in to reply to this topic.