• Resolved isaac85

    (@isaac85)


    This seems like a pretty straightforward problem, but I haven’t been able to find any information about it in the forums or elsewhere on the internet.

    My store is in 2 languages, CZ and EN. I overrode the default email templates according to the WooCommerce instructions in order to customize the text in the bodies of the processing, completed, etc… emails.

    All of those emails are in English and I’d like to create their equivalents in Czech, but none of the email text is showing up in the Loco Translate string translation editor at Plugins/WooCommerce/woocommerce-cs_CZ.po

    Is there something else I need to do to get these strings to show up so they can be translated?

    Thanks in advance for your help.

    Theme: Storefront
    Wordpress ver. 4.9.2
    Loco Translate ver. 2.0.17

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tim W

    (@timwhitlock)

    I know nothing about WooCommerce email templates.

    My first query would be whether you need to define your own source strings. Why not simply translate the strings you want to override?

    If you really did have to add your own English text, then you’ll have to internationalize it as if you were authoring your own theme or plugin.

    Thread Starter isaac85

    (@isaac85)

    Thanks for your reply. I had originally asked WooCommerce support about this but they directed me to Loco Translate and I couldn’t find anything in the documentation.

    The reason I can’t just translate the strings is because I need my website to function in both English and Czech.

    The default WooCommerce email templates that get sent to customers are a bit bland so I wanted to personalize them a little. The issue is that only the strings from the default email templates are showing up in Loco Translate, not the strings from the new, edited email templates.

    It’s not so much that I had to add my own English text, but rather just edit the English text that was there. So is there any way to sync the edited text to Loco Translate?

    Thanks!

    Plugin Author Tim W

    (@timwhitlock)

    The reason I can’t just translate the strings is because I need my website to function in both English and Czech.

    I don’t see the problem. You can translate English->English and English->Czech. Did you try this?

    It’s not so much that I had to add my own English text, but rather just edit the English text that was there.

    Same thing.

    I strongly recommend you avoid defining new source strings.

    As I’ve already said, defining new strings means internationalizing your code (either as a plugin or a child theme) before you can use Loco Translate.

    I still see no reason you can’t simply create custom translations for the WooCommerce strings that are already provided. It will save you a lot of very technical work.

    Hi @isaac85,
    maybe you should try to search for solution in documentation of plugin which serves the multilingual content
    Here is documentation for polylang and there is solution for WPML.
    I hope that one of these links will help you solve this problem.

    Thread Starter isaac85

    (@isaac85)

    Tim, that’s exactly what I’m trying to do, which is why I think I’m missing something potentially obvious. I can translate the default WooCommerce strings into Czech, but even if the Czech version is our personlized text, the source strings are still the default WooCommerce text.

    I certainly would like to avoid defining new source strings. When you say:

    I don’t see the problem. You can translate English->English and English->Czech. Did you try this?

    What do you mean by “translate English->English”? That sounds like it would accomplish exactly what I need, but I don’t see any option to edit the source text in Loco. Am I looking in the wrong place?

    Tomas:
    Believe me, that was my first thought. PolyLang (and the plugin that integrates it with WooCommerce) don’t support translation of the emails, and they specifically recommended Loco Translate for that.

    Plugin Author Tim W

    (@timwhitlock)

    What do you mean by “translate English->English”? That sounds like it would accomplish exactly what I need, but I don’t see any option to edit the source text in Loco

    Don’t edit source text files (they are templates). Click “Add language” under the WooCommerce bundle and choose English (en_US).

    It is perfectly ok to create English translation files. This will keep the “msgid” fields as the original source text (essential) and just adds your custom “msgstr” fields.

    e.g.

    msgid "Hello"
    msgstr "Hi"

    “Hello” will be used to look up the translation in the “woocommerce” text domain and with your custom file loaded it will return “hi”.

    Thread Starter isaac85

    (@isaac85)

    That’s perfect. It never occurred to me to create separate English translation files but it did exactly what I needed. Thanks so much for your patience with this one.

    The only thing is that there’s one string which only appears in the EN files but not in the CZ files (“There are no shipping methods available. Please ensure that your address has been entered correctly, or contact us if you need any help.”)

    Have you seen that before? Any idea what could be causing that?

    Thanks!

    Plugin Author Tim W

    (@timwhitlock)

    You must sync your CZ file so it reflects the available strings (defined in the WooCommerce POT file). This does not happen automatically.

    Open the CZ PO files in the Loco Translate editor and click the Sync button. Do not click Save until you’re happy the available strings are correct.

    Thread Starter isaac85

    (@isaac85)

    Got it!

    Thanks so much, Tim!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Translate Woocommerce emails’ is closed to new replies.