I'm developing a theme and curious if strings could be written in a language different from English and still be properly translatable?

What I mean is when using translation functions in a custom theme, e.g. __('string','textdomain') or __e('string','textdomain') can I use language different from English to write the string, for example: __e('строчка','textdomain')?

Or do I have to write everything in English and then provide a translation files for other languages (presumably because theme's default language defaults to the WPLANG setting in wp-config.php)?

Hope someone can clarify this.

1 Answer 1


Yes, you can use any language you want. But if you want your theme to be translated by everyone, you should pick a language that people are likely to know, like English.

If you, for example, care only about former USSR countries, Russian might be as good.

  • So there's no such thing as the default language of a theme in terms of code, other than what I decide it to be? For example translation plugins don't consider themes to be in English by default? In other words it's a relative matter?
    – Oleg
    Feb 17, 2018 at 17:54
  • The default language is what you set it to be during the installation process. With regards to plugin the proper language is pulled as per default language setting. So even if plugin Authors considers the English as the default language of theme, the plugin will still pull the proper language regardless of what is the default.
    – Den Isahac
    Feb 17, 2018 at 17:58
  • @Oleg, people would expect that the default language will be english, but technically if your strings are in russian, for people that use russian locale it will make no difference at all. It might look weird for people that will want to translate it thats all. Beside of the technical aspect, if you will want to submit the theme to wordpress.org or theme forest, they might have explicit requirement about the language being used (no idea with there are). Feb 18, 2018 at 4:36

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.