I want to modify this attribute by programmatically
After many times research i found this class in lib magento
Magento\Framework\View\Page\Config
Unfortunately magento team set locale in construct function so i can't use plugin (intercepts) to modify it
public function __construct(
//Some injection here
) {
// cut some lines here
$this->setElementAttribute(
self::ELEMENT_TYPE_HTML,
self::HTML_ATTRIBUTE_LANG,
strstr($this->localeResolver->getLocale(), '_', true)
);
}
Is there a better way to modify this attribute ?
I have different page html with seperate locale config from backend, and i want to set lang attribute for my own page with selected locale