Internationalization and functions that use it

It is only a design for one site and won’t be a theme anyone can use and hence I don’t want to bother with internationalization.

If the theme will only ever be used by you, internationalization isn’t a huge deal. Unless, of course, you will want to use a different language version of your theme in the future.

However, it’s a good idea to get in the practice of always internationalizing your work. This way, if you ever change your mind about the theme (i.e. decide to release it later) you’ve already got the work done.

Most often it’s just replacing a few lines of code:

echo 'Some string';

Becomes:

_e( 'Some string', 'your-theme-textdomain' );

And:

return 'Some string';

Becomes:

__( 'Some string', 'your-theme-textdomain' );

How I have been told that it’s a bad idea to remove the textdomain as it may end up with odd results.

If you omit the textdomain from either __() or _e(), WordPress will assume you’re using the default textdomain that ships with core. And yes, some odd results will occur, but they aren’t too bad.

For example, WordPress internally can translate “Post” and “Add New” but not “My super cool theme.” When your theme is translated, anywhere you passed in “Post” and “Add New” without a textdomain will be translated, but “My super cool theme” won’t.

If I’m not bothering with internationalization what do I do?

If you’re not going to worry about internationalization at all, then just don’t use __() or _e() at all and you won’t need to worry about textdomains either.