• Resolved luc333

    (@luc333)


    hi support,

    the plugin is mistranslating $ to dollars when it should be singapore dollars. i saw on your website that i can add a notranslate code to prevent this.

    however, i’m not a developer and have no idea where to add the code. can you point me in the right direction with detailed instructions?

    i know i should add <span class=”woocommerce-Price-amount amount”>…</span>. i want to know:

    1. what should be in the …
    2. where should i add it?

    website link https://tongguanseafood.com/shop/

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Did you try using USD or US$ instead of $ for United States currency?

    If that doesn’t help, the plugin you’re using (e.g., WooCommerce) needs to be updated to localize currencies when they are translated. If you haven’t yet, I would contact the developers of WooCommerce for input and/or a fix.

    By the way, these posts should also give you a lead to help fix your issue. You can also try my solution (for a similar issue) using the plugin, Code Snippets.

    GTranslate (free) will not help since it uses Google’s native (machine) translation algorythms. However, GTranslate (premium) can get you there.

    If satisfied with the above, kindly consider closing this topic as “Resolved.”

    Cheers! 🙂

    Note: I’m not affiliated with GTranslate. Simply offering goodwill support.

    Update:

    As a courtesy, and to address directly your request, you can use this code snippet:

    function add_new_class_currency() {
    ?>
    <script type="text/javascript">
    var ntarray = (document).getElementsByClassName("woocommerce-Price-amount amount");
    for(var i = 0; i < ntarray.length; i++)
    ntarray.item(i).className += " notranslate";
    </script>
    <?php
    }
    add_action('wp_footer', 'add_new_class_currency');

    Give it a spin. Let me know if it works.

    If it doesn’t, try the following class names: (in lieu of woocommerce-Price-amount amount)

    woocommerce-Price-amount
    woocommerce-Price-currencySymbol

    Cheers!

    Thread Starter luc333

    (@luc333)

    hi @generosus

    thanks for your reply! i’ll give your solutions a whirl and update here.

    i am curious though, where gtranslate’s suggested <span class=”woocommerce-Price-amount amount”>…</span> should go? is it in the css section?

    Use the code snippet I provided using the plugin, Code Snippets. If you have no coding skills, consult a developer or post a topic in the support forum of Code Snippets.

    I inspected your website and it appears you have solved your issue. Hurrah!

    Thread Starter luc333

    (@luc333)

    yes, i managed it after trying out your code last night using code snippets. thank you so much for your help!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘How to stop gtranslate from translating currency symbols’ is closed to new replies.