I created a theme and I want to publish it in wordpress.org. I used TGM library to check to require plugins. but the Theme-check get bellow warning:

Warning: More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs.

Should I change text-domain of TGM library? Or like the Envato, it's not necessary to change text-domain of TGM?


Themes should always have only one textdomain - most of the localization tools base on that assumption, so if you put multiple textdomains in the same theme, you make localizing it much harder.

As for wordpress.org... It is clearly stated that:

Themes that are hosted on WordPress.org the text domain must match the slug of your theme URL (wordpress.org/themes/). This is needed so that the translations from translate.wordpress.org work correctly.

The text domain name must use dashes and not underscores and be lowercase. For example, if the theme’s name My Theme is defined in the style.css or it is contained in a folder called my-theme the text domain should be my-theme.

The text domain is used in three different places:

In the style.css theme header As an argument in the localization functions As an argument when loading the translations using load_theme_textdomain() or load_child_theme_textdomain() style.css theme header #style.css theme header The text domain is added to the style.css header so that the theme meta-data like the description can be translated even when the theme is not enabled. The text domain should be same as the one used when loading the text domain.

Source: https://developer.wordpress.org/themes/functionality/internationalization/#text-domain

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.