• Resolved emliron

    (@emliron)


    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

    ?

Viewing 5 replies - 31 through 35 (of 35 total)
  • Plugin Author Robin W

    (@robin-w)

    thanks, glad I’m not totally mad!

    I’ll work some code up to improve this

    Plugin Author Robin W

    (@robin-w)

    I have been working on some code, but I am away for a few days, so I’ll do a fresh release inc the /n/r stuff hopefully the end of this week ??

    Plugin Author Robin W

    (@robin-w)

    should all work in 5.8.1 – let me know ??

    Thread Starter emliron

    (@emliron)

    All work, the warning for the role is clear. Thank you!

    Plugin Author Robin W

    (@robin-w)

    great – thanks – your help to improve the plugin is much appreciated ??

Viewing 5 replies - 31 through 35 (of 35 total)
  • The topic ‘E-mail translation’ is closed to new replies.