From 6702cdce13957b10dbf29a4a00e17eba6f97c982 Mon Sep 17 00:00:00 2001 From: Cristian Sanclemente Date: Thu, 19 Oct 2017 15:49:16 +0200 Subject: [PATCH] get language code --- lib/internal/Magento/Framework/View/Page/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Page/Config.php b/lib/internal/Magento/Framework/View/Page/Config.php index aafb5eda9b617..529f8b02e0635 100644 --- a/lib/internal/Magento/Framework/View/Page/Config.php +++ b/lib/internal/Magento/Framework/View/Page/Config.php @@ -174,7 +174,7 @@ public function __construct( $this->setElementAttribute( self::ELEMENT_TYPE_HTML, self::HTML_ATTRIBUTE_LANG, - str_replace('_', '-', $this->localeResolver->getLocale()) + strstr($this->localeResolver->getLocale(), '_', true) ); }