New Landing How can we help? Themeforest Theme Support Uplift Translate "NEW" badge

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Uplift
  • #285616
    Dare2Dream
    Member
    Post count: 43

    Hello,

    I really love the “NEW” badge in Uplift, but I was wondering: is there an easy / update friendly way to translate the word “NEW”?

    Sincerely, Niels

    #285801
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme:-

    function sf_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'NEW' :
    			$translated_text = __( 'CHANGE ME HERE', $domain ); // just change it
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'sf_text_strings', 20, 3 );

    Thanks
    Mohammad

    #285812
    Dare2Dream
    Member
    Post count: 43
    This reply has been marked as private.
    #285821
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Code is correct. Your editor replaced the single quote (‘) with '.
    Thanks
    Mohammad

    #285872
    Dare2Dream
    Member
    Post count: 43
    This reply has been marked as private.
    #285875
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Just provide me specific page url with issue.
    Thanks
    Mohammad

    #285876
    Dare2Dream
    Member
    Post count: 43
    This reply has been marked as private.
    #285879
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove the last php code at functions.php of child theme and use this custom css code at Admin > Theme Options > Custom CSS.

    li.sf-menu-item-new-badge:after {
        content: "NIEUW" !important;
    }

    Thanks
    Mohammad

    #285881
    Dare2Dream
    Member
    Post count: 43

    Fantastic! Thank you very much! Looks great!

    #285888
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Glad 🙂 to help you.
    Thanks
    Mohammad

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register