This topic has 8 replies, 2 voices, and was last updated 9 months, 3 weeks ago ago by Luca Rossi
How to translate the limiter in the image
Dear @smalameri,
We hope this message finds you well.
We have identified an issue with the Loco Translate plugin concerning the translation of certain text strings. To resolve this, we kindly request that you insert the following code snippet into the functions.php file located within your child theme’s directory:
function n2t_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Clear shopping cart':
$translated_text = 'Your Text 1';
break;
case 'Coupon code':
$translated_text = 'Your Text 2';
break;
}
return $translated_text;
}
add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
We trust that this adjustment will address the translation discrepancies you have encountered. Should you require any further assistance, please do not hesitate to reach out to us.
Warm regards,
The 8Theme Team
not clear
Hi @smalameri,
Please provide temporary wp-admin access.
To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.
Thank you for your cooperation and we look forward to hearing from you soon.
Best Regards,
8Theme’s Team
Private sent
Hi @smalameri,
We’ve added the following codes under functions.php file in your child theme:
function n2t_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Clear shopping cart':
$translated_text = 'Your Text 1';
break;
case 'Coupon code':
$translated_text = 'Your Text 2';
break;
}
return $translated_text;
}
add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
Then the texts on the cart page are translated now: https://prnt.sc/tvryNBjY-SOE
Can you check again?
Best Regards,
8Theme’s Team
ok
but you can give me steps pleas
how you added ?
Dear @smalameri,
We hope this message finds you well.
We kindly request that you visit the following link to view our custom codes:
[Custom Codes for Theme](https://***-electrical.com/wp-admin/theme-editor.php?file=functions.php&theme=xstore-child)
Additionally, you can review a screenshot of the codes here:
[Screenshot of Custom Codes](https://prnt.sc/6uVzQtbwnguC)
Should you require further translations, please feel free to replicate the following lines of code accordingly:
case 'Coupon code':
$translated_text = 'رمز القسيمة';
break;
We trust this will be of assistance to you. Should you have any further inquiries or require additional support, please do not hesitate to reach out.
Warm regards,
The 8Theme Team
You must be logged in to reply to this topic.Log in/Sign up