This topic has 2 replies, 2 voices, and was last updated 7 years, 8 months ago ago by Jack Richardson
Hello,
I am trying to find a solution for days but without any success.
The problem: Royal theme comes without a proper .pot file. It has only a “default.po” and a “default.mo”. To my knowlage there should be a royal.pot file. And the theme comes with 3 textdomains what is confusing too..
I know that in your documentation you suggest to use Poedit to translate but I would really prefer to use Loco Translate because its an excellent plugin and I use it for all of my sites with different themes and to translate all of my plugins. Last week, they released a new (complete rebuild) version of Loco Translate which let you save translations in an update safe way and it works for all of my themes and plugins, except Royal theme.
As there is no royal.pot file by default, I click the “Create template” button and Loco creates royal.pot but this template only contains 8 strings, but in fact there are more than 1300.
Thats why I made a copy of default.po and renamed it to royal.pot. But everytime I want to sync this .pot file, it deletes about 1300 strings and 8 remain.
I guess that this happens because the textdomain of Royal is “royal” but in the theme files, it’s only called “ETHEME_DOMAIN”. So instead of <?php _e( ‘Hello’, ‘royal’ ); ?> you have <?php _e( ‘Hello’, ETHEME_DOMAIN ); ?> The author of Loco Translate says “This is bad localization practice, and Loco will not be able to extract strings that require run time evaluation of text domains. https://localise.biz/help/wordpress/theme-localization#gotchas” (quote from here: https://wordpress.org/support/topic/sync-when-theme-domain-is-a-defined-costant)
So it would be so great if you could help me how to setup this correctly to be able to sync the template file!
Many thanks in advance!
Hello,
You need to translate the theme as described in documentation https://www.8theme.com/demo/docs/royal/#!/1_how_to_translate
Unfortunately we don’t guarantee for full compatibility with 3-rd party plugins.
Best regards,
Jack Richardson.
You must be logged in to reply to this topic.Log in/Sign up