E-mail translation
-
Hello,
I’m using WPML on my site. The emails defined in the plugin are not translated.
I’ve redefined the bsp_topic_message function in functions_email.php, replacing the lines :
88: $message = (!empty($bsp_style_settings_email[$type]) ? $bsp_style_settings_email[$type] : $message) ;
with 88: $message = (!empty($bsp_style_settings_email[$type]) ? __e($bsp_style_settings_email[$type],’bbp-style-pack’) : $message) ;
and line :
102 : $message = str_replace( “\r”, ‘<br>’, $message );
by the lines :
$message = str_replace( “\r”, ‘<br>’, $message );
$message = str_replace( “\r”, ‘<br>’, $message );
$message = str_replace( “\n”, ‘<br>’, $message );
This works, but it would be simpler if it were modified in the plugin.
The same would have to be done for bsp_reply_message.
Another way would be to redefine the $bsp_style_settings_email variable to take account of translations.
Once this change was made, I was able to translate the templates using WPML’s string translation.
Best regards
Emmanuel
?
- The topic ‘E-mail translation’ is closed to new replies.