Support » Plugin: Frontend Reset Password » Sending email in a different language?

  • Resolved daro2013

    (@daro2013)


    Hi sir,

    I know my question is outside of your support. Can I customise your plugins for sending an email in a different language? I have tried to customise this template:

    wp-content/plugins/frontend-reset-password/includes/somfrp-functions.php

    It seems not let me do it. I managed to create correct email verification link for another language, but my code to check currentl language of the page is not working. Here is my codes:

    function som_get_register_url() {
    return get_permalink( get_page_by_path( ‘login’ ) ) . ‘?section=register’;
    }

    function get_url_of_page_id_5719() { // Get URL of French page based on its ID: 5719
    return get_permalink( 5719 );
    }
    add_action( ‘after_setup_theme’, ‘get_url_of_page_id_5719’ );

    function som_get_lost_password_url() {
    $options = get_option( ‘somfrp_gen_settings’ );
    $value = ( isset( $options[‘somfrp_reset_page’] ) && $options[‘somfrp_reset_page’] ) ? $options[‘somfrp_reset_page’]: ” ;
    if ( ! empty( $value ) ) {
    $page = get_permalink( $value );
    // return $page;
    }
    // $lang = substr($_SERVER[‘HTTP_ACCEPT_LANGUAGE’], 0, 2);
    // $locale = Locale::acceptFromHttp($_SERVER[‘HTTP_ACCEPT_LANGUAGE’]);
    $lang = substr($_SERVER[‘HTTP_ACCEPT_LANGUAGE’], 0, 2);
    if ($lang == ‘en’) {
    return $page;
    }
    if ($lang == ‘fr’) {
    return get_url_of_page_id_5719();
    }
    }

    For example, it does not detect French language at all even users are on French page; it only sends email in English with default email verification link.

    I would very much appreciate if you could give a right direction to achieve it?

    Cheers
    Daro

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Very bad plugins as it is stick to redirect to the same page after users submitted their reset buttons. That is drawback of this plugins.

    If anyone want to use a custom password reset page, just create a simple template, and you can customise emails sent to users on that template easily. No need to use this plugins which is very LIMITED!

    I regret to give 5 stars to this plugins

    I have given up this plugins, and develop own Password Reset template instead.

    Plugin Author Richard Webster

    (@rwebster85)

    Hi Daro, an update is currently being finished to address several things the community has voiced over the past for weeks. Should be live later today, including a success page redirect as well as HTML custom emails and extra filters for developers.

    That would be good. But I have own Password Reset template now; and it works perfectly; I can create it for any language with email being sent in any language.

    But I may try your new features if they come out.

    Thanks

    Plugin Author Richard Webster

    (@rwebster85)

    Hi Daro that sounds excellent mate, I’d be happy to take a look at your code to see how you did it. I thought it might be impossible 😉

    Plugin Author Richard Webster

    (@rwebster85)

    I’ll class this as resolved for now as sending custom emails depending on the user’s language is something you’ve added yourself 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sending email in a different language?’ is closed to new replies.