laravel-localization
laravel-localization copied to clipboard
Fixed values for `lang` and `hreflang` attribute
Regional langs xx_YY it's not a valid value for that attribute. It should be xx-YY
The regional value is used internally for setting the regional locale (so formatLocalized works in Carbon) and is in the correct format for that.
In this case, in my opinion, the regional
key should be renamed tolocale
which will correspond to the Carbon documentation. And to each language add the hreflang
key, which will be used for SEO for<link rel = "alternate" hreflang = "{{$ properties ['hreflang']}}" href = "#">
and in what value the locale
key will be specified in xx-YY format. If you now use the format xx_YY for hreflang
service validator.w3.org
reports that this is an incorrect format.