I hope to receive some helpful pointers to solve an issue with BuddyPress and Qtranslate-XT plugins for Wordpress. I have tried to ask for help on GitHub (qtranslate-xt) and on the BuddyPress forums, but it seems there is little interest in making BuddyPress multilingual. Groups, Group Types, and Member Profile fields do not register for language switching buttons of qtranslate-xt in the backend. I am an absolute novice concerning integrating a plugin with qtranslate-xt so and all my attempts to add respective filters to the respective i18n-config.json failed. Thus, I have given up in this regard but would really appreciate some hints on how I could fix the one element that is not working on the frontend: directory listings of group and member types. Instead of showing only the current language for a displaying the type, the directory listing (e.g. on ../members/type/test/) shows the entry in all languages with tags (e.g., [:en]Test[:de]Versuch[:], see screenshot).
Screenshot: BuddyPress failing to integrate with QTranslate-XT
The respective text is generated in the group or members loop via the functions bp_current_group_directory_type_message or bp_current_member_type_message. For example, see the entry in bp-members-template.php
`
function bp_get_current_member_type_message() {
$type_object = bp_get_member_type_object( bp_get_current_member_type() );
/* translators: %s: member type singular name */
$message = sprintf( __( 'Viewing members of the type: %s', 'buddypress' ), '<strong>' . $type_object->labels['singular_name'] . '</strong>' );
/**
* Filters the current member type message.
*
* @since 2.3.0
*
* @param string $message Message to filter.
*/
return apply_filters( 'bp_get_current_member_type_message', $message );
}
`
I have tried adding a matching filter into the i18n-config.json but it does not work.
`
{
"vendor": {
"plugins/buddypress": "1.0"
},
"front-config": {
"all-pages": {
"filters": {
"text": {
"bp_get_activity_action": "20",
"bp_get_activity_content_body": "20",
"bp_get_activity_content": "20",
"bp_get_current_member_type_message": "20"
}
}
}
}
}
`
If someone has any ideas how to solve this issue, would be much appreciated!