I'm internationalizing a large website in 14 languages.
I have found that some of the language/countries we want to target do not have lang-cc entries in various lists, e.g. dot net cultures, language-codes-and-iso-country-codes-for-html5.
As an example, Danish is widely spoken in Greenland.
We are translating our site in to Danish for users in Denmark.
It therefore makes sense to offer the translated content to Danish speakers in Greenland, however the lang/country code for this is not listed in resources we have found (especially as Google Greenland exists - google.gl).
So, can we safely use da-gl
in hreflang
and as a sub directory to target Danish speakers in Greenland even though that combination is not listed in the various resources we've found?
(Please note that we can't simply redirect users from Greenland to the Danish version targeted at Denmark as there are differences in currency and shipping prices, and we are trying to avoid any IP based redirection / content customisation.)
There is no list of "valid" combinations, as nobody can (nor should!) define which languages are spoken in which regions, or which linguistic variations exist.
HTML5 defines which content the hreflang
attribute can have:
On Webmasters SE, I explained what this means (for the lang
attribute, but it’s the same for hreflang
): my answer to "Where do I get a list of attribute 'lang' values - what standard covers this, for SEO optimization?"
As you see, you only have to follow the rules from BCP 47 and choose tags from the Language Subtag Registry.
Thus da-GL
is a valid value for hreflang
/lang
:
da
is the subtag for the language Danish-
is the subtag separatorGL
is the subtag for the region Greenland
来源:https://stackoverflow.com/questions/28088512/can-i-use-custom-language-country-code-combinations-in-hreflang