We had the same problem (only for Dutch) but we found no proper way to translate the strings of the WP Customer Review plugin. It is not possible to overwrite the templates and there are no filters of translation functions available for these strings.
The only option we found was to use the filter ‘option_wpcr3_options’ which is executed right before the HTML is outputted. We do a find-and-replace for the strings. See below for an example.
/*
* Strings in wpcr3 plugin are not translatable so find strings to translate and replace them with your translate function or custom string
*/
function iside_option_wpcr3_options( $value, $option) {
if( isset( $value['templates'] ) ) {
$value['templates'] = str_replace( 'Create your own review', __('Please submit your review', 'iside'), $value['templates'] );
$value['templates'] = str_replace( 'Check this box to confirm you are human.', __('Check this box to confirm you are human.', 'iside'), $value['templates'] );
}
return $value;
}
add_filter( 'option_wpcr3_options', 'iside_option_wpcr3_options', 10, 2 );
-
This reply was modified 4 years, 1 month ago by
leendertvb.
-
This reply was modified 4 years, 1 month ago by
leendertvb.