Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #198240

    Hi there,

    I just changed the ‘register’ text on the top to ‘Czech translation of the word’, by adding the following code to functions.php:

    add_filter( ‘gettext’, ‘register_text’ );
    add_filter( ‘ngettext’, ‘register_text’ );
    function register_text( $translated ) {
    $translated = str_ireplace( ‘Register’, ‘Registrace’, $translated );
    return $translated;
    }

    That worked perfectly. Now I would love to change the login/logout text on the top as well. Can you guys help me out?

    kind regards,
    Sander

    #198271

    Hey Kleefaan!

    Have you tried something like this?

    add_filter( "gettext", "login_text" );
    add_filter( "ngettext", "login_text" );
    function login_text($translated ){
    $translated = str_ireplace( "login", "login", $translated );
    return $translated;
    }
    
    add_filter( "gettext", "logout_text" );
    add_filter( "ngettext", "logout_text" );
    function logout_text($translated ){
    $translated = str_ireplace( "logout", "logout", $translated );
    return $translated;
    }

    Cheers!
    Josue

    #198300

    hey Josue,

    Thanks so much for the quick response. I managed to do it by installing the http://wordpress.org/plugins/codestyling-localization/ plugin. That worked easily.

    Thanks for the support!

    #198301

    You are welcome, glad we could help :)

    Regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘change login/logout text’ is closed to new replies.