change one word

Home Forums Legacy Support Support queries Translation issues change one word

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #215621
    MeesterGijs
    Spectator
    Where and how can I change this word? Underneath the login... image
    #215733
    logan
    Member
    Hello, add this code in your customizer plugin. add_action('init', function(){ ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> jQuery(document).ready(function($){ $("body.login div#login p#nav>a:first-child").text("translated register text should be here!!"); }); </script> <?php }); refer: http://prntscr.com/o79ul0
    #215751
    MeesterGijs
    Spectator
    That worked! Thanks. You can close this one.
    #215837
    MeesterGijs
    Spectator
    Don't close! I noticed that the code gave unlimited jquery errors. And it made my courses page be blank... Any idea how come? I deleted the code and the page loaded perfectly fine again. :)
    #215838
    MeesterGijs
    Spectator
    Is there not a way to translate the word using Loco translate?
    #215956
    logan
    Member
    Please try to find in wplms theme and BuddyPress plugin. don't forget to sync.
    #216018
    MeesterGijs
    Spectator
    I found such a string in Buddypress but it didn't change on the site after adjusting the translation and saving and syncing it. Perhaps because I dont have a local buddypress file?
    #216158
    logan
    Member
    i have searched thoroughly and found that this is coming from wordpress itself. whatever you select as your site language, it automatically translate in that language.
    #216194
    MeesterGijs
    Spectator
    Is it possible to change that?
    #216299
    logan
    Member
    #216413
    MeesterGijs
    Spectator
    Dear Logan, Your first link doesn't refer to my issue. I have the Dutch language set. I want a Dutch word translated to another Dutch word.. With regard to your second link. I have the text changed that you see after wrong username/passwoord. I've added it at the bottom of this post. I'm talking about this one word. code: add_filter('login_errors','login_error_message'); function login_error_message($error){ //check if that's the error you are looking for $pos = strpos($error, 'incorrect'); if (is_int($pos)) { //its the right error so you can overwrite it $error = "Gebruikersnaam/wachtwoord klopt niet. <p>Tip1: Gebruikersnaam is niet hoofdlettergevoelig</p> <p>Tip2: Gebruik emailadres als gebruikersnaam</p> <p>Tip3: Verwijder browsergeschiedenis</p> <p>Tip4: Kies hieronder voor 'wachtwoord vergeten'</p>"; } return $error; }
    #216516
    logan
    Member
    Sparky :) add this code in your customizer plugin. 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 Address') $translated_text = 'YOUR TEXT'; if ($translated_text === 'Password') $translated_text = 'YOUR TEXT'; if ($translated_text === 'Register') $translated_text = 'YOUR TEXT'; if ($translated_text === 'Remember Me') $translated_text = 'YOUR TEXT'; if ($translated_text === 'Lost your password?') $translated_text = 'YOUR TEXT';   return $translated_text; } } add_filter( 'gettext', 'my_custom_login_label', 20, 3 ); refer: http://prntscr.com/o9ern0
    #216525
    MeesterGijs
    Spectator
    The code conflicts with the customizer.php code in line 166: add_action( 'bbp_template_redirect', 'action_bbp_template_redirect'); This is the message that I get: Jouw PHP-wijzigingen zijn teruggedraaid vanwege een fout op regel 166 in het bestand wp-content/plugins/js_composer/include/classes/core/class-wpb-map.php. Repareer en probeer opnieuw. Uncaught Exception in wp-content/plugins/js_composer/include/classes/core/class-wpb-map.php:166 Stack trace: #0 wp-content/plugins/js_composer/include/helpers/helpers_api.php(40): WPBMap::map('rev_slider', Array) #1 wp-content/plugins/revslider/includes/tinybox.class.php(89): vc_map(Array) #2 wp-includes/class-wp-hook.php(286): RevSliderTinyBox::add_to_VC('') #3 wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #4 wp-includes/plugin.php(465): WP_Hook->do_action(Array) #5 wp-settings.php(525): do_action('init') #6 wp-config.php(93): require_once('/home/public/si...') #7 wp-load.php(37): require_once('/home/public/si...') #8 /home/public/sites/www.meeste
    #216552
    logan
    Member
    Try this one: function my_custom_login_label( $translated_text, $text, $domain ) { if (in_array( $GLOBALS['pagenow'], array('wp-login.php') )) { if ($translated_text === 'Username or Email Address') $translated_text = 'YOUR 1'; if ($translated_text === 'Password') $translated_text = 'YOUR 2'; if ($translated_text === 'Register') $translated_text = 'YOUR 3'; if ($translated_text === 'Remember Me') $translated_text = 'YOUR 4'; if ($translated_text === 'Lost your password?') $translated_text = 'YOUR 5'; } return $translated_text; } add_filter( 'gettext', 'my_custom_login_label', 99999, 3 );
    #216565
    MeesterGijs
    Spectator
    No it doesn't give an error when adding to customizer.php, but it doesn't translate the strings..
Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘change one word’ is closed to new replies.