-
AuthorPosts
-
January 12, 2016 at 8:38 pm #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
January 12, 2016 at 11:14 pm #564207Hi nokie1!
you need to translate it manually using Poedit or a plugin like loco translate.
Cheers!
AndyJanuary 13, 2016 at 3:06 am #564268Hey 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
January 13, 2016 at 2:16 pm #564699Ok, 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.
January 13, 2016 at 11:50 pm #565063Any Idea?
January 14, 2016 at 12:34 pm #565348Does the slae badge on masonary gets overwritten by the theme..? Please give me an answer….
January 14, 2016 at 6:50 pm #565673Hi!
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!
YigitJanuary 16, 2016 at 9:13 pm #566599Hey Yigit,
thanks for your Help but adding your code kills the whole Page :D only white background and black text!
January 19, 2016 at 2:10 am #567501would be still happy if someone could help out
January 20, 2016 at 6:31 am #568393Hey!
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,
IsmaelJanuary 20, 2016 at 12:31 pm #568562Hey 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.
January 22, 2016 at 2:26 am #569686Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueFebruary 2, 2016 at 9:53 pm #576725Hey Josue, im not allowed to do this because my customer is allready selling through his Onlineshop. Any other Workarounds?
February 2, 2016 at 10:04 pm #576731Ok, can you post a link to the page with the issue?
Best regards,
JosueFebruary 4, 2016 at 1:16 pm #577748I post u the link as private content
February 4, 2016 at 1:25 pm #577754Hey!
Try adding this code to the Quick CSS:
span.onsale { font-size: 0; } span.onsale:before{ content: "Sonderangebot"; font-size: 12px; }
Cheers!
JosueFebruary 4, 2016 at 1:38 pm #577764Wow, thanks for the quick solution, totaly works!
Have a nice day!
-
AuthorPosts
- The topic ‘Sale Badge Translation’ is closed to new replies.