X & Pro Translations

Hello folks,

I’ve translated X, Cornerstone and Pro into Brazilian Portuguese (pt-BR), and I’ve managed to have the language packs working from /wp-content/languages/themes and /plugins (for Cornerstone). But I don’t know exactly how to manage the translation file for Pro, since it translates some things but not others (specially the Builders part is a bit weird). So I have a few questions on how to correct implement my X translations into Pro sites:

  • What should be the Text Domain?
  • How should I do to implement it on my Pro-Child?

Thank you and best regards!

Hi Fabio,

Thanks for reaching out.

It should be the same as you translated X and Cornerstone, the text-domain is still the same as __x__. You can find the pot file that can be used for translation at \pro\framework\lang

But instead of a separate theme and cornerstone, you’ll just translate it as a whole. Like in /wp-content/languages/themes (but no need for /wp-content/languages/plugins)

https://developer.wordpress.org/themes/functionality/localization/

eg. wp-content/languages/themes/pro-pt_BR.mo.

And that kind of localization doesn’t need to be child theme-specific.

Thanks!

Actually, i have the same problem, even if i place the files where they belong to!!!
But i did only translate pro.pot! Do i need x.pot to?

Hello @Regnalf,

You will have to use x.pot if you installed the X theme. For those who are using Pro theme, pro.pot file should be used. You may need to use PoEdit when doing your translation so that it will convert into your translation files like:

  • __x__-de_DE.po and __x__-de_DE.mo
  • __x__-en_GB.po and __x__-en_GB.mo
  • __x__-fr_FR.po and __x__-fr_FR.mo

Hope this helps.

Yes, thanks, that does the trick. Always a little bit confusing if the text-domain is not corresponding with the filename! (most themes and plugins doesn’t have this difference).
Maybe you could add a short readme file in the framework/lang folder to prevent unnecessary support calls :wink:

Hi Fabio,

I have similar experiences when translating Wordpress. And my impression is it’s unpredictable, and that itself is Wordpress related since the theme and plugins follow the same standard to make them translatable. Sometimes I have to load language files through a child theme too. That could be the reason why their documentation has many alternate procedures when it comes to translation, but again, it’s Wordpress standard :slight_smile:

And noted your request :slight_smile:

Thanks!

Hey @Rad thank you for all the infos.

I just thought that the Pro language could be __ pro __ instead of __ x __ that’s why I’ve asked in first time. I can use __ x __ just would like to import in some way my already translated strings from Cornerstone and X into Pro, would solve 80% of Pro translation…

I keep wondering if I could import in some way my translations for X and Cornerstone into the Pro .po file, since I have it all translated… Would it work?
Thanks again for your help! Cheers!

Hello @Regnalf,

Yes, it will work. This is why we have the __x__-{ab_CD} translation file so that as soon as you switch to Pro, the translation file is still the same. If you are using PoEdit software in doing your translation, you can simply open the pro.pot file and then when you save, save it using the same filename as what you have for X theme which is __x__-{ab_CD}.po and __x__-{ab_CD}.mo.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.