https://www.w3.org/International/questions/qa-choosing-language-tags#subtagregistry
To find a primary-language subtag, search the page for the name of that language.
Maybe it's obvious to some, but I think it's worth mentioning here that it's the language name in English, not in the native tongue.