Do I need to include a textdomain if my theme doesn't support translation?

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.

Topic theme-review localization codex repository theme-development Wordpress

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.