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.
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.
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.