Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1261145
    Hugobosss
    Participant

    Hi!

    I am using Swedish translation of .PO and .MO but I am not able to translate the login page. I want to change “Username” to “e-mail”. The strings are translated with POedit but it doesn’t work.

    Could you please advise?

    Thanks!

    #1261146
    Hugobosss
    Participant
    This reply has been marked as private.
    #1261303
    Rupok
    Member

    Hi there,

    Thanks for writing in! It’s not actually a theme feature or functionality. As stated on our sidebar, Support covers getting setup, theme features, and bug fixes.

    Thanks for understanding.

    #1262424
    Hugobosss
    Participant

    Hi!

    Thanks, I understand. Do you want to point me in the right direction?
    What is this login form part of?

    If not, thanks anyway!

    #1262497
    Darshana
    Moderator

    Hi there,

    Just to provide some guidance, try adding the following code into your Child Theme’s functions.php file and then you can set your translated strings and see.

    
    //Translate WordPress Login
    function my_custom_login_label( $translated_text, $text, $domain ) {
        if (in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) )) {
            if ($translated_text === 'Username or Email') $translated_text = 'YOUR TEXT';
            if ($translated_text === 'Password') $translated_text = 'YOUR TEXT';
            if ($translated_text === '← Back to %s') $translated_text = '← YOUR TEXT';
    
        return $translated_text;
      }
    }
    add_filter( 'gettext', 'my_custom_login_label', 20, 3 );
    

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1261145 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>