Re: Having trouble integrating WP functions
Sorry, didn’t read bbPress source carefully. Replace first if clause with
if ( defined('BBLANG') && '' != constant('BBLANG') ) {
if ( function_exists('load_default_textdomain') ) {
global $l10n;
$locale = BBLANG;
$mofile = BBPATH . BBINC . 'languages/' . "$locale.mo";
if ( is_readable($mofile) ) {
$input = new CachedFileReader($mofile);
$l10n['default'] = new gettext_reader($input);
}
}
else {
include_once(BBPATH . BBINC . 'streams.php');
include_once(BBPATH . BBINC . 'gettext.php');
}
}
PS. That “..” is how you put variable to be parsed in string in PHP ( Variable parsing )