I am working currently on rebuilding a platform that is targeting local companies within the country. It should be localised and available in couple of languages. I inspected couple of big companies products and they often have something like
domain.com/en-us/shop(for english USA)
domain.com/en-gb/shop(for english England)
while i already made logic that supports only language really
domain.com/en/shop(regardless of country)
I started some research and its not really easy to find if there is some standard that must be followed.
I checked this topic What is the correct and better language code format in URL and hreflang?. Sadly it doesnt have any answers, its also marked as duplicate of topic that doesnt say single thing about this matter.
this is the topic that was suppose to be original URLs: Should I use hyphens, underscores or plus symbols? its completely unrelated to this problem.
then i found this topic When using country and language codes in a URL, which goes first? which presents a table that displays
Java supported localeslike that one
en_AUhowever noone realy uses this format in the url.
So my question would be. What is the
SEO favorited format of language in url? is it fine to use just language code
/en or it must be including country code
/en-gb then if so should it be represented as
en_GB like in point 3 or it should be rather
en-gb like existing big companies use?
All above ofc assuming that you are not using strategy of domain extension specific for country
domain.de or google like which is to detect language and skip it all together.