-
Hello
So, my question is: Where is the value of <html lang="en"> in the page header pulled from? and how to change it?
I rechecked the code and as I saw this value is taken from lang Name in your language file, especially in sys_localization_languages db table. But you may try to use 'en-us' as name. It should be correctly recognized and 'en' is used as 'lang' in HTML tag.
-
Hi @Anton L
Thanks a lot for your reply. I went into the database > sys_localization_languages table, then changed the 'Name' value from 'us' to 'en-us'. It works. 'en' is used as lang in the 'HTML' tag. Thanks a lot.
Now I have two questions:
Question #1: With the change above, should I also need to change every instance of 'us' to 'en-us' in my new English (US) language module when creating it? or maybe, just changing the 'Name' value in the sys_localization_languages table is enough, it's the only thing that needs to be modified.
Example:
In language_module/install/config.php
Should I change:
'name' => 'xxx_us', To: 'name' => 'xxx_en-us'
'home_uri' => 'us', To: 'home_uri' => 'en-us',
in language_module//install/sql/install.sql:
Should I change:
INSERT INTO `sys_localization_languages`(`Name`, `Flag`, `Title`, `Enabled`) VALUES('us', 'us', 'English (US)', '0');
To:
INSERT INTO `sys_localization_languages`(`Name`, `Flag`, `Title`, `Enabled`) VALUES('en-us', 'us', 'English (US)', '0');
in language_module//install/sql/enable.sql
Should I change:
UPDATE `sys_localization_languages` SET `Enabled`='1' WHERE `Name`='us';
To:
UPDATE `sys_localization_languages` SET `Enabled`='1' WHERE `Name`='en-us';
in language_module//install/sql/enable.sql
Should I change:
UPDATE `sys_localization_languages` SET `Enabled`='0' WHERE `Name`='us';
To:
UPDATE `sys_localization_languages` SET `Enabled`='0' WHERE `Name`='en-us';
in language_module//install/sql/disable.sql
Should I change:
UPDATE `sys_localization_languages` SET `Enabled`='0' WHERE `Name`='us';
To:
UPDATE `sys_localization_languages` SET `Enabled`='0' WHERE `Name`='en-us';
Also should I rename all my app translation files within the English (US) language module (e.g.: /data/langs/bx_artificer/us.xml) from:
us.xml
to
en-us.xml
and in those xml translation file,
Should I change:
To:
"en-us" flag="us" title="English (US)">
Do I need to make those changes? Please advise.
Question #2: For testing purposes and as I am planing to create new language modules in the near future, I changed the value of 'Name' to 'fr-fr', 'fr-ca', 'es-es' and 'es-mx' in the `sys_localization_languages` table but nothing happened. The value of 'lang' in the HTML tag remains 'en'.
Why can't they change to "fr' or 'es' as 'en-us' does and changes to 'en'? Any idea?
Thanks
-