0

We're using the CodeStyling Localization plugin and getting this warning:

Warning: The actual loaded translation content contains mixed textdomains and is not pure translateable within one textdomain.
It seems, that there is code contained extracted out of other plugins, themes or widgets and used by copy & paste inside some source files.
The affected unknown textdomains are <domain1>, <domain2>

Despite Google'ing I'm none-the-wiser. Can anyone shed some light on what the problem is, what the consequences are (e.g. if I ignore it) and how it can be fixed (if necessary).

1 Answer 1

0

If I am correct (I am not familiar with the plugin itself) it actualy means that you have/use more then one text-domain in your function(s) or theme template(s) as in (just an example):

_e( 'Your Ad here', 'my-text-domain' ) / _e( 'Your Ad here', 'your-text-domain' )

You should always use one text-domain for your functions (if they are in functions.php, and you should use another for your home-brew plugin (because your translation files (.po and .mo) are also in the plugin folder itself if done correctly).

They (a text-domain) can be used actualy everywhere (templates/functions/classes/plugins).
I assume that in your case it could be in one of your own created function(s)/plugin(s) or in your theme template file(s) which you added/edit?!

About the what the consequences are, the only one I can think of is, your text (which you want to translate) will not be found by the CodeStyling Localization plugin and so not be translated by you.

I hope this information is what you where looking for and helps you to solve your problem.

See Codex for Translatable strings

3
  • Had a read of the Codex but can't see any details of mixing up text-domains. Is it an unwritten rule that you can only have one text domain per template?
    – Snowcrash
    Aug 14, 2015 at 16:33
  • Maybe reading following articles/faqs 1 2 and 3 will help to understand how it works and why it works that way.
    – Charles
    Aug 15, 2015 at 0:26
  • not particularly! I've read all of these articles / faqs and am still none-the-wiser!
    – Snowcrash
    Aug 18, 2015 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.