• Resolved Bernard Lemieux

    (@blecreateur)


    Hi,
    I am trying to use Loco Translate to help me with thanslating some strings in Divi. I have copied the launguage files to my child theme as they suggest. That is fine, but I would rather use Loco Translate than Poedit since I already use it a lot for plugins.

    They have 2 text domains: Divi and et_builder. I was able to make it work for text domain Divi, but how would I configure the other domain? It looks like only one domain is allowed.
    Thanks,
    Bernard

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Bernard Lemieux

    (@blecreateur)

    Hi,
    I have educated myself a bit more on Internationalization of a WordPress theme. I realize that Eleganthemes is failing to follow these standards with Divi. Overall the Divi text domain is what matters the most because it involves a lot of frontend strings. et_builder text domain is for the backend, which is ok but I found a few strings involving error messages that I wanted to translate with Loco…

    I would be glad to ear that there is a solution, and I would understand if the only solution has to come from the authors of the theme.
    Thanks,
    Bernard

    Plugin Author Tim W

    (@timwhitlock)

    Loco Translate can be configured to use multiple text domains for a single theme, or a single plugin. It can even be used to split text domains into multiple files. None of this can happen automatically because – as you point out – it is non-standard.

    See the documentation on Advanced configuration.

    Be aware that child themes should have their own text domains, and not share that of their parent. I can’t say how that will affect you in this case, but please see my guide to translating child themes for more detail.

    Thread Starter Bernard Lemieux

    (@blecreateur)

    Great!
    Thanks for pointing me in the right direction.
    As you suggested, I created a new set for the extra text domain.
    Also, I am translating the theme itself leaving the child theme for my onw text domain.

    Divi includes only MO files in their 2 language folders. I had to get the PO / POT files from them. I placed the PO / POT files on special folders in my child theme so they don’t get overwritten.

    Then I made a copy of the fr_FR.mo for each domain and made the copies custom.
    Thanks again.

    Thread Starter Bernard Lemieux

    (@blecreateur)

    Hi,
    Just wanted to close the loop with Divi translation with Loco.
    I realized there was a 3rd text domain. So we have ‘Divi’ and ‘et_builder’ for which I was able to create translation sets. But we also have ‘et_core’.

    ‘et_core’ is not only used for the theme, but also for Eleganthemes’ Bloom and Monarch plugins. It looks like the 3 share the same code, same text, same text domain.

    I’ve tried to make it work but failed because the name of the et_core custom language files would be the same for Bloom and Monarch (et_core-fr_FR.po / mo). Plus, there is a file bigger than 110kb… So for the few strings I need to translate here I will use str_ireplace in my functions.php.

    Anyways, your plugin is awesome.
    Thanks,
    Bernard

    Plugin Author Tim W

    (@timwhitlock)

    Thanks for the post back.

    Embedding shared frameworks and such inside a code base will indeed cause duplication problems. I don’t know why theme developers don’t manage dependencies as plugins, but I’m sure they have a good reason.

    However, as text domains are unique you could possibly translate just one instance and it would be used by all. Just a thought. I’m sure you’ve tried everything.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘2 text domains for Divi theme’ is closed to new replies.