Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
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
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
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. –  toscho Feb 13 '13 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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