Skip to content

Commit 31ad91c

Browse files
ENGCOM-2586: [Backport] Magento sets ISO invalid language code #17212
- Merge Pull Request #17212 from mageprince/magento2:2.1-develop-PR-port-11561 - Merged commits: 1. 6702cdc
2 parents f06f52c + 6702cdc commit 31ad91c

File tree

1 file changed

+1
-1
lines changed
  • lib/internal/Magento/Framework/View/Page

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/View/Page/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function __construct(
174174
$this->setElementAttribute(
175175
self::ELEMENT_TYPE_HTML,
176176
self::HTML_ATTRIBUTE_LANG,
177-
str_replace('_', '-', $this->localeResolver->getLocale())
177+
strstr($this->localeResolver->getLocale(), '_', true)
178178
);
179179
}
180180

0 commit comments

Comments
 (0)