• Resolved vocelov

    (@vocelov)


    To reproduce my issue:

    1. Please open https://www.torbizapodaraci.com/
    2. Scroll down and add any product to the shopping cart by clicking the cart icon in the top right corner of the product image
    3. Please open https://www.torbizapodaraci.com/checkout/

    There are two phrases that I can’t find where to translate them from.

    The first one is “Country / Region” situated on the left section. You will recognize it as the only phrase which is in English.

    For the second one, you need to click on the “ПРОМО КОД” dropdown which is at the very top of the page, after which you will see a button “Apply Coupon”.

    I need to translate both of these to Bulgarian. All other phrases on my website I have translated using the Loco Translate plugin. These two I can’t find anywhere. Does anyone know where to translate them from?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @vocelov

    You can try with this code:

    add_filter( 'gettext', 'my_translation', 10, 3 );
    
    function my_translation( $translated, $original, $domain ) {
        if ( $original == "Out of stock" ) {
            $translated = "translated word";
        }
        return $translated;
    }

    Change the texts of the $original and $translated content to your needs.

    Regards.

    Plugin Support Ross V. a11n

    (@rossviviano)

    Automattic Happiness Engineer

    Hi @vocelov,

    Just a quick FYI: if you ever have trouble finding where certain strings are coming from, you can use this plugin to help you find them.

    Best,

    Ross

    Thread Starter vocelov

    (@vocelov)

    @rossviviano thanks! I solved my issue with this plugin, although one has to be extra careful with it if he’s not a technical guy

    @oscar Abad Folgueira thank you for the suggestion, I have applied the other plugin suggested, but if I can’t translate some phrases using it, I will try your solution too

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    Hi @vocelov,

    Glad to hear it – thanks for letting us know!

    I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unable to translate two phrases’ is closed to new replies.