admin管理员组文章数量:1130349
I created a theme and I want to publish it in wordpress. 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 language packs.
Should I change text-domain of TGM library? Or like the Envato, it's not necessary to change text-domain of TGM?
I created a theme and I want to publish it in wordpress. 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 language packs.
Should I change text-domain of TGM library? Or like the Envato, it's not necessary to change text-domain of TGM?
Share Improve this question edited Nov 29, 2018 at 9:40 Krzysiek Dróżdż 25.6k9 gold badges53 silver badges74 bronze badges asked Nov 29, 2018 at 9:29 iliyamasiliyamas 133 bronze badges1 Answer
Reset to default 0Themes 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... It is clearly stated that:
Themes that are hosted on WordPress the text domain must match the slug of your theme URL (wordpress/themes/). This is needed so that the translations from translate.wordpress 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/themes/functionality/internationalization/#text-domain
I created a theme and I want to publish it in wordpress. 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 language packs.
Should I change text-domain of TGM library? Or like the Envato, it's not necessary to change text-domain of TGM?
I created a theme and I want to publish it in wordpress. 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 language packs.
Should I change text-domain of TGM library? Or like the Envato, it's not necessary to change text-domain of TGM?
Share Improve this question edited Nov 29, 2018 at 9:40 Krzysiek Dróżdż 25.6k9 gold badges53 silver badges74 bronze badges asked Nov 29, 2018 at 9:29 iliyamasiliyamas 133 bronze badges1 Answer
Reset to default 0Themes 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... It is clearly stated that:
Themes that are hosted on WordPress the text domain must match the slug of your theme URL (wordpress/themes/). This is needed so that the translations from translate.wordpress 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/themes/functionality/internationalization/#text-domain
本文标签: translationShould I change textdomain of TGM library inside theme
版权声明:本文标题:translation - Should I change text-domain of TGM library inside theme? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749142472a2322421.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论