Translate Dublin core meta (or other meta)
Dublin Core is a collection of meta tags to describe your content.These tags are automatically generated. Recognised by states/governments, these are used by directories, Bing, Baidu and Yandex.
Dublin Core is a set of meta tags describing your content (recognised by several search engines and directories). They are not translated by default, but you can register them with the weglot_get_dom_checkers filter.
Translate a single meta (e.g. <meta name="dc.title" content="…" />):
add_filter( 'weglot_get_dom_checkers', 'dublin_core_weglot_dom_check' );
function dublin_core_weglot_dom_check( $dom_checkers ) {
if ( ! class_exists( 'Dublin_Core_Meta' ) ) {
class Dublin_Core_Meta extends Weglot\Parser\Check\Dom\AbstractDomChecker {
const DOM = 'meta[name="dc.title"]';
const PROPERTY = 'content';
const WORD_TYPE = Weglot\Parser\Definitions\Enum\WordType::META_CONTENT;
}
}
$dom_checkers[] = '\Dublin_Core_Meta';
return $dom_checkers;
}To target several meta tags at once, list them in the DOM selector (comma-separated):
const DOM = 'meta[name="dc.title"],meta[name="dc.description"]';Last updated