How to translate the limiter in the image

This topic has 8 replies, 2 voices, and was last updated 3 months, 2 weeks ago ago by Luca Rossi

  • Avatar: smalameri
    smalameri
    Participant
    February 28, 2024 at 07:30

    How to translate the limiter in the image

    Files is visible for topic creator and
    support staff only.
    7 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    February 28, 2024 at 09:07

    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

    Avatar: smalameri
    smalameri
    Participant
    February 28, 2024 at 09:18

    not clear

    Avatar: Justin
    Luca Rossi
    Support staff
    February 28, 2024 at 09:31

    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

    Avatar: smalameri
    smalameri
    Participant
    February 28, 2024 at 09:32

    Private sent

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    February 28, 2024 at 10:30

    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

    Please contact administrator
    for this information.
    Avatar: smalameri
    smalameri
    Participant
    February 28, 2024 at 10:44

    ok

    but you can give me steps pleas

    how you added ?

    Avatar: Justin
    Luca Rossi
    Support staff
    February 28, 2024 at 11:38

    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

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.