translation
-
I use loco translate to menege translation.
The strings plugin dont affected by po file saved.
any solutions?
many thanks!
-
hi inasher
i am working on creating a configuration for strings and also a working po file.Hi! Just commenting to keep me update. I was coming here to say exactly the same thing.
But is there a way to already translate somethings like
“Please submit your request”
“Place your order” ?I’m sorry I just saw you have posted it on the other topic. Thanks
not a problem. here . make sure you change the wordings
add_filter( 'woocommerce_product_single_add_to_cart_text', 'gpls_woo_rfq_cart_button_text' ,100); add_filter( 'add_to_cart_text', 'gpls_woo_rfq_cart_button_text',100 ); add_filter( 'woocommerce_product_add_to_cart_text', 'gpls_woo_rfq_cart_button_text',100 ); function gpls_woo_rfq_cart_button_text() { global $woocommerce; // CHANGE THE TEXT HERE $in_cart = __('your own Already in cart - Add Again?', 'woocommerce'); $add_to_cart = __('your own Add to cart', 'woocommerce'); // END CHANGE THE TEXT HERE foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) { $_product = $values['data']; if( get_the_ID() == $_product->id ) { return $in_cart; } } return $add_to_cart; } //your own proceed to checkout text add_filter('gpls_woo_rfq_proceed_to_checkout','gpls_woo_rfq_proceed_to_checkout',10,1); function gpls_woo_rfq_proceed_to_checkout($proceed_to_checkout){ $proceed_to_checkout = "your own proceed to checkout text"; return $proceed_to_checkout; } // when you have a RFQ checkout setting add_filter('gpls_woo_rfq_rfq_submit_your_order_text','gpls_woo_rfq_rfq_submit_your_order_text',10,1); function gpls_woo_rfq_rfq_submit_your_order_text($order_button_text){ $order_button_text = "your own submit QUOTE text "; return $order_button_text; } // when you have a normal checkout setting add_filter('gpls_woo_rfq_checkout_submit_your_order_text','gpls_woo_rfq_checkout_submit_your_order_text',10,1); function gpls_woo_rfq_checkout_submit_your_order_text($order_button_text){ $order_button_text = "your own submit ORDER text "; return $order_button_text; }Thank you!
Everything works.
Just the “add to cart” button that is still showing add to cart & the proceed to checkout too.make sure you changed both texts in the section
// CHANGE THE TEXT HERE $in_cart = __('your own Already in cart - Add Again?', 'woocommerce'); <strong> $add_to_cart = __('your own Add to cart', 'woocommerce');</strong> // END CHANGE THE TEXT HEREsorry that did not work like i wanted
CHANGE THE TEXT HERE
$in_cart = __(‘your own Already in cart – Add Again?’, ‘woocommerce’);
$add_to_cart = __(‘your own Add to cart’, ‘woocommerce’);
// END CHANGE THE TEXT HEREI am working on putting all of these in the settings section of plugin. for now that is the best i can come up with
I actually have changed it.
If you could please take a look and see if I did something wrong.https://yasmimrodrigues.gyazo.com/f43eeb2de64db07ea75fc59d4ff60913
try changing the “100” to a 999.
other than we need to change it in the settings when it finished 🙂
you could try this and see if it works:
function replace_my_content($text){ $replace = array( // 'words to find' => 'replace with this' 'Add to Cart' => 'your own' ); $text = str_replace(array_keys($replace), $replace, $text); return $text; } add_filter('the_content', 'replace_my_content'); add_filter('the_excerpt', 'replace_my_content');I changed it to 999 and it worked! Thanks
put the one i gave you last
The topic ‘translation’ is closed to new replies.