- This topic has 17 replies, 4 voices, and was last updated 2 years, 5 months ago by
Ying.
-
AuthorPosts
-
October 21, 2022 at 11:05 pm #2381811
Alon
I have RTL woocommerce website and everything looks great except “Display cart panel on add to cart”.
When a user add product to cart the cart panel is not RTL and in english (everything else is RTL and in my language).
How can i change that?
Thank you in advance.October 22, 2022 at 11:22 am #2382440Ying
StaffCustomer SupportHi Alon,
Would you like this layout?
https://www.screencast.com/t/HTvEGm7MXIf so, can you try adding this CSS?
.rtl .add-to-cart-panel .continue-shopping { margin-left: auto; margin-right: unset; } .rtl .add-to-cart-panel .cart-info { margin-right: unset; margin-left: 20px; }
Let me know!
October 22, 2022 at 11:38 am #2382456Alon
Thank you for your reply.
Now… How can i change the text to my language without plugin (loco translate).
I’ll be really happy if you can help me with this one.October 22, 2022 at 11:49 am #2382471Ying
StaffCustomer SupportNow… How can i change the text to my language without plugin (loco translate).
It should be translated by default, is your site a multi language site?
What’s the site default language set at settings > general > Site Language?
Can I take a look at your site? Let me know!
October 22, 2022 at 11:52 am #2382473Alon
My site default language is Hebrew.
Everything in my site translated flawlessly except this cart panel.October 22, 2022 at 11:59 am #2382481Ying
StaffCustomer SupportCan you switch to a twenty twenty theme to see if the translation is correct there?
October 22, 2022 at 12:39 pm #2382501Alon
I have no idea how to do this.
I can’t find any cart panel in twenty twenty theme.October 22, 2022 at 12:57 pm #2382514Ying
StaffCustomer SupportOops my bad, the function doesn’t exist in twenty twenty themes.
Can you translate below English words to Hebrew so I can write the function using the Hebrew words?
– Checkout
– Continue shopping
– Item added to cartLet me know!
October 22, 2022 at 1:20 pm #2382535Alon
Checkout – לתשלום בקופה
Continue shopping – המשך קניות
Item added to cart – פריט נוסף לסל קניות
Item – פריט
Items – פריטיםThank you so much.
October 23, 2022 at 4:04 am #2382795David
StaffCustomer SupportHi there,
try this PHP snippet:
function cart_panel_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Checkout' : $translated_text = 'לתשלום בקופה'; break; case 'Continue shopping' : $translated_text = 'המשך קניות'; break; case ' Item added to cart. ' : $translated_text = 'פריט נוסף לסל קניות'; break; case 'Item' : $translated_text = 'פריט'; break; case 'Items' : $translated_text = 'פריטים'; break; } return $translated_text; } add_filter( 'gettext', 'cart_panel_text_strings', 20, 3 );
October 23, 2022 at 7:08 am #2382927Alon
Thank you for your help.
The code translate just the first one – לתשלום בקופה.
The others still in Eng.October 23, 2022 at 5:43 pm #2383455Fernando Customer Support
Hi Alon,
For reference, may you provide the link to the site in question?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
October 24, 2022 at 9:23 pm #2384829Alon
https://wouldyoukindly.co.il/product-category/modules.
Please click on any button (הוספה לסל).
Thank you in advance.October 25, 2022 at 3:05 am #2385174David
StaffCustomer SupportI made a slight change to my code above, can you try that.
If its correct then theItem added to cart.
should change.
Let me know.October 25, 2022 at 6:38 am #2385339Alon
Hello David.
It doesn’t work.
It looks to me exactly as the code before. -
AuthorPosts
- You must be logged in to reply to this topic.