
Hello UNA Team,
While creating a language module, I came across an issue with the html language tag that should be addressed as it affects the SEO. Maybe It's the result of a wrong setting from my side, i don't know.
I have created a new language module that I named 'English (US)' and which is basically a clone of the default 'English' module. I wanted to change few words and to use the US flag in the language switcher.
The issue is that the value of the html lang tag is wrong.
Whenever I switch to another language, the value of the html lang tag changes as well to reflect the new language, which is good.
e.g: from
to
The problem is 'us' is not a valid ISO Language Code to be used in the Html lang tag because 'lang' in the html tag is used to determine the 'document language' not the 'region'. The correct value, in this case, should just be "en" no matter if it's English (GB) or English (US).
So, my question is: Where is the value of in the page header pulled from? and how to change it?
In the config.php file of my newly created language module, I have the following parameter:
'home_uri' => 'us',
In the language module install/sql/install.sql, I have the following query:
INSERT INTO `sys_localization_languages`(`Name`, `Flag`, `Title`, `Enabled`) VALUES('us', 'us', 'English (US)', '0');
All the App xml files (translation files) are named us.xml e.g:
/data/langs/bx_artificer/us.xml
And, in the us.xml files, I have the following line:
Please help.
Thanks