Skip to:

Re: Having trouble integrating WP functions

The workaround won’t work for plugins.

@sambauers: I think there is no complete working solution if you don’t touch the core files.

First, load_default_textdomain and load_plugin_textdomain are WordPress version, they only look language files in WordPress directories. So, in bbPress, all text won’t be translated since language file are not loaded because WordPress load_*_textdomain won’t find language files in bbPress’ directories.

Second, WordPress and bbPress both use default as textdomain when calling __() or _e() without assigning textdomain, that means we can only use either WordPress’ or bbPress’ language files at the same time, not both.

(edit: plugin’s problem can be solved by add a bb_load_plugin_textdomain, but bbPress’s part. If we don’t want to use something like bb__(), bb_e(), maybe we can try to merge bbPress translations into WordPress’ in runtime? or search bbPress’ first, then WordPress’ if can’t find)

Skip to toolbar