Lang attribute

Modify the lang attribute on html tag

Override Lang attribute

You can modifiy your own lang attribute (or another element in dom) by using our weglot_render_dom filter

add_filter( 'weglot_render_dom', 'prefix_weglot_render_dom' );
function prefix_weglot_render_dom( $dom ) {
	// Code
	$dom = str_replace('lang="en-US"', 'lang="en-US-wg"', $dom);
	return $dom;
}

Last updated