According to the codex

Themes are required to use theme-slug (or a reasonable facsimile) as textdomain for translation

Does this mean that my theme needs to include a textdomain even if my theme doesn't support translation? ... and also is there any harm in including a textdomain in style.css if there are no translation options.

  • 2
    I guess you should ask directly to an official source, Make/Themes. "If you have a question or need clarification about the Theme Review Guidelines, want to propose an addition or change to the Guidelines, or have a question about Theme development best practices, please ask on the mail-list." - Then, post the Answer here ;) – brasofilo Feb 12 '13 at 23:41

If your code, be it a theme or a plugin, does not support translation, then don’t use the translation functions. And if you don’t use these functions, you cannot use a text domain. :)

There is a very common error that looks like this:

echo __( 'Portfolio' );

Portfolio is not part of WordPress’ core strings, so this code will waste an expensive look-up in the list of translated words without result.

Another side effect is a partial translation when some of these function calls without text domain match core strings. Imagine a navigation where the link to the previous page is in Japanese and the link to the next page in English. This is worse than no translation at all.

So text domains are not your problem, the use of translation functions is important.

  • So do you think the codex is saying that IF a theme supports translation it is required to use theme-slug (or a reasonable facsimile) as textdomain for translation – byronyasgur Feb 13 '13 at 13:52
  • @byronyasgur Yes, exactly. Even when you are using strings from core. – fuxia Feb 13 '13 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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