• Resolved yuriivarrs

    (@yuriivarrs)


    Hi,

    I have an issue with TranslatePress and WooCommerce.

    ISSUE:
    Names of states/prefectures on WooCommerce are sent to my drop shipping partner in Japanese if the Japanese language is selected, but I want them to be sent in English.

    DESCRIPTION:
    Orders my customers place on WooCommerce are sent to my drop shipping partner using API.

    If I have selected Japanese from the language switcher using TranslatePress, states/prefectures I choose would be sent to the drop shipping partner in Japanese, but they should be sent in English.

    Here are some screenshots:

    WooCommerce checkout page in Japanese:
    https://postimg.cc/tYPSXhLc

    The country and prefecture show in Japanese.

    Drop shipping partner dashboard:
    https://postimg.cc/N9cRYzrJ

    The prefecture I selected has been sent in Japanese, but the country has been sent in English.

    QUESTION:
    Is there any way to send WooCommerce states/prefectures to my drop shipping partner in English instead of Japanese?

    Note:
    It seems this issue only occurs with TranslatePress (it did not occur with GTranslate)

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    Those strings should be gettext, which means you can exclude them from being processed by TranslatePress using the Exclude gettext Strings feature from TP Settings –> Advanced tab. You need to exclude the original names of the prefectures, in the default language you have in TranslatePress (or how they appear in the original language/default language when you select them in Translation Editor mode).

    Thread Starter yuriivarrs

    (@yuriivarrs)

    Thanks for your reply, but this won’t quite resolve my issue. It’s OK that the frontend UI is translated into the target language (Japanese), but I don’t want the translated value to be sent to my drop shipping partner. Is there any way to send the values in the original language (English) while keeping the frontend UI translated into the target language?

    I could use your solution as a last resort if there is no way to do this, but how do I specify the strings I want to exclude? If I want to exclude Japanese prefectures like “Akita” or “Aomori,” should I simply add those to “Gettext String” in the Advanced settings of TranslatePress? I added them in the original language, but they were still translated into Japanese.

    Thread Starter yuriivarrs

    (@yuriivarrs)

    One more question: If I only specified a string text to be excluded, it would be excluded on all locations, correct? How do I specify a string for a specific location? There should be a string name of some sort, but I’m not sure how to find it.

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    1. You need to add them exactly as they are detected in Translation Editor. You should add the domain also (this one is specified under that string, inside the brackets, in the list of strings). If you exclude them, they will still be translatable manually with the Translation Editor, but will not receive anymore the translations from the WooCommerce files.

    2. You can chose a location just by excluding a specific selector from being translated, using the Exclude selectors from translation and Exclude selectors from dynamic translation. However, this will exclude them from front-end.

    Thread Starter yuriivarrs

    (@yuriivarrs)

    Hi,

    So, by “domain” you mean the text in brackets right? For example, the domain of “about” in the image you provided is “Post Slug,” correct?

    The text I want to exclude doesn’t seem to have a domain:

    https://ibb.co/mBGthqp

    In the above image, “Prefecture” is what I want to exclude, but it doesn’t have brackets below it. What should I do?

    Could you also answer my other question?

    >Thanks for your reply, but this won’t quite resolve my issue. It’s OK that the frontend UI is translated into the target language (Japanese), but I don’t want the translated value to be sent to my drop shipping partner. Is there any way to send the values in the original language (English) while keeping the frontend UI translated into the target language?

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    As soon these strings are comes from the plugin that creates it, WooCommerce in this case, and are the same as the one displayed at the front-end, we don’t have a settings to exclude them just for one part.

    You can try to exclude the gettext domain, woocommerce, in order to avoid processing of woocmmerce strings or using an addon that disalbes the gettext translation for your website, https://translatepress.com/docs/developers/disable-translation-of-gettext-strings/. However, this will exclude them from the front-end also, so you will have them untranslated, which I understand is not something you are looking for.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WooCommerce states/prefectures are translated when it’s not necessary’ is closed to new replies.