Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #564140

    Hey Guys,

    im using your enfold theme and noticed that the “Sale” Badge on Product Pages is translated to “Verkauf” on german. Thats not the acurate translation and i would love to change it. Ive allready tried to put some codes in my functions.php, as i read it on a tutorial, but the sale text wont change. do you have a solution for this?

    ty

    #564207

    Hi nokie1!

    you need to translate it manually using Poedit or a plugin like loco translate.

    Cheers!
    Andy

    #564268

    Hey Andy,

    i changed the text but it seems like it only had an effect to the sale badge on the signle product pages, not on the product overview page.i allready looked for the language file but couldnt find it. do u have any idea? ty

    #564699

    Ok, it seems that the woocomerce translation file is getting overwritten somewhere, but i cant figure out how or where.

    i also noticed, after using this code in my in my functions.php

    add_filter('woocommerce_sale_flash', 'avia_change_sale_content', 10, 3);
    function avia_change_sale_content($content, $post, $product){
    $content = '<span class="onsale">'.__( 'Sonderangebot', 'woocommerce' ).'</span>';
    return $co

    the sale badge has changed on single product pages and on the regular wc product overview, but im using a masonary gallery to show the products and the code has no effect on the sale badge there, even if its the same span class. Can you help me out?

    • This reply was modified 8 years, 10 months ago by nokie1.
    #565063

    Any Idea?

    #565348

    Does the slae badge on masonary gets overwritten by the theme..? Please give me an answer….

    #565673

    Hi!

    Please try adding following code to Functions.php file in Appearance > Editor

    function add_custom_code(){
    ?>
    <script>
    jQuery(document).ready(function(){
    jQuery('body').each(function() {
        var text = jQuery(this).text();
        jQuery(this).text(text.replace('Verkauf', 'Sonderangebot')); 
    });
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_code');

    Cheers!
    Yigit

    #566599

    Hey Yigit,

    thanks for your Help but adding your code kills the whole Page :D only white background and black text!

    #567501

    would be still happy if someone could help out

    #568393

    Hey!

    Please copy the code directly from the forum, not from your email. Let us know if it still kills the page. Make sure that the function name is not the same with the existing ones.

    Best regards,
    Ismael

    #568562

    Hey Ismael,

    of course i copied the code from the forum, the functions names are diffrent, i anyway removed the other code while testing your code. still kills the page, just white backgrund and very tiny black text.

    #569686

    Hi,

    Can you please create us a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #576725

    Hey Josue, im not allowed to do this because my customer is allready selling through his Onlineshop. Any other Workarounds?

    #576731

    Ok, can you post a link to the page with the issue?

    Best regards,
    Josue

    #577748

    I post u the link as private content

    #577754

    Hey!

    Try adding this code to the Quick CSS:

    span.onsale {
        font-size: 0;
    }
    
    span.onsale:before{
        content: "Sonderangebot";
        font-size: 12px;
    }

    Cheers! 
    Josue

    #577764

    Wow, thanks for the quick solution, totaly works!

    Have a nice day!

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Sale Badge Translation’ is closed to new replies.