Hello @gugax
The wait might be long. Download and use the special version from the feature/multilingual branch in the Ultimate Member repository on GitHub if you need integtation with the Polylang plugin now.
The strings with that i’m not able to translate are:
“We are sorry. We cannot find any users who match your search criteria.”
“{total_users} Member”
“{total_users} Members”
These strings come from the member directory settings Results Text, Single Result Text, Custom text if no users were found. See https://docs.ultimatemember.com/article/1513-member-directories-2-1-0#results
You can use hooks um_ajax_get_members_response
and um_member_directory_agruments_on_load
in your custom code to override these strings with equivalent strings from language files.
add_filter( 'um_ajax_get_members_response', function( $directory_data ) {
if ( array_key_exists( 'pagination', $directory_data ) ) {
$directory_data['pagination']['header'] = UM()->member_directory()->convert_tags( __( '{total_users} Members', 'ultimate-member' ), $directory_data['pagination'] );
$directory_data['pagination']['header_single'] = UM()->member_directory()->convert_tags( __( '{total_users} Member', 'ultimate-member' ), $directory_data['pagination'] );
}
return $directory_data;
} );
add_filter( 'um_member_directory_agruments_on_load', function( $args ) {
$args['directory_no_users'] = __( 'We are sorry. We cannot find any users who match your search criteria.', 'ultimate-member' );
$args['no_users'] = __( 'We are sorry. We cannot find any users who match your search criteria.', 'ultimate-member' );
return $args;
} );
Regards