Translate main Button
-
Hi, first thank you for this great plugin it does a great job!
I just have a small thing that I couldn’t resolve by myself.
We are using Polylang and I could not translate the main button, the default “Filters” toggle button. Every other string correctly gets registered in Polylang except this one.
Usually, I add an unregistered string like this:
/ /add soldout badge add_action( 'woocommerce_before_shop_loop_item_title', function() { global $product; if ( !$product->is_in_stock() ) { echo '<span class="Out_of_stock">' . pll__('Out of stock') . '</span>'; } }); add_action('init', function() { pll_register_string('mytheme-hello', 'Out of stock'); });
But here I’m at a loss as the plugin is not added through function.php
Here is the code I do have so far:
// Move filter button before shop’s top row add_filter( 'awf_js_data', function( $js_data ) { $js_data['togglable_preset']['insert_btn_before_container'] = '.kadence-shop-top-row'; return $js_data; } ); // Register in polylang add_action('init', function() { pll_register_string('mytheme-hello', 'Filters'); });
But as you can see, I am missing the part where I “tell” polylang the button can be translated.
Would you be able to tell me how to do it?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Translate main Button’ is closed to new replies.