• Resolved sayantansdas

    (@sayantansdas)


    Hi there,

    First of all, thank you for this plugin. Very helpful. I wanted help with a small text change.

    I get the following?prompt when I try to post a private query when I’m not logged in:
    You must?login?to view your message.

    I want to change above message to:?
    You must?login?to send/view your message.

    Similarly,

    After I sent the Private Query I got the following message:
    Message successfully sent.

    I want to change the message to :? ?
    Your message has been sent successfully.

    I tried using the following code, but without success. Any help would be great.

    add_filter( 'gettext', function( $translated_text, $text, $domain ){
        if ( 'front-end-pm' == $domain && 'You must login to view your message.' == $text ){
            $translated_text = 'You must?login?to send/view your message.';
        }
        return $translated_text;
    }, 20, 3 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, sayantansdas, I’m another Front End PM user.

    I was actually doing some translating myself earlier with a string in this plugin hooking into gettext like you.

    I think if you modify the string to be 'You must <a href="%s">login</a> to view your message.', it will work, since you need the actual string with the HTML included, as written in the plugin files.

    Thread Starter sayantansdas

    (@sayantansdas)

    @plantprogrammer , thank you so much. this worked perfectly .

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change text for login and messages’ is closed to new replies.