• Using the TML widget, all is fine (i.e. translated) except error message when entering wrong username or password.
    The message “ERROR: The username or password you entered is incorrect. Lost your password?” still shows in English. Digged into po/pot-files, in Plugin-language directory and in general wp-content/languages/plugins directory to find position of that english text, but no luck.
    Could you point into the right direction please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    I belive that string is from WP core and should be handled in it’s translation file.

    I have exactly the same problem, and I’ve been through WP core and still cannot find it

    Did you find a solution? location of that line?

    We can also use the filter wp_login_errors available in This file called theme-my-login-custom.php and it must reside in /wp-content/plugins.
    When theme-my-login-custom.php is present, it is always loaded when the plugin is loaded.

    Use the below code in file called theme-my-login-custom.php and it must reside in /wp-content/plugins.

    <?php
    
    add_filter( 'gettext', function( $translation, $text, $domain )
    {
        if ( 'default' !== $domain )
            return $translation;
    
        if ( '<strong>ERROR</strong>: The username or password you entered is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?' !== $text )
            return $translation;
    
        return '<strong>ERREUR</strong>: Votre Email ou votre Mot de passe est incorrect. <a href="%2$s" title="Mot de passe perdu">Mot de passe perdu</a>?';
    }, 10, 3 );
    ?>
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation issue’ is closed to new replies.