This is basically correct. It's worth an addendum though that IETF language tags are in turn based substantially on ISO 639 language codes and ISO 3166 country codes, and while AFAIK POSIX doesn't mandate the use of these vocabularies, it's de facto common practice to use them for the language and territory parts of POSIX locales as well. So there's some indirect, distant shared background. Beyond that, the two strings contain intersecting but differing sets of information because they were made for different purposes: affecting the ambient behavior of a user environment and its applications versus describing the language of content on the Internet. For instance, a POSIX locale can imply a default character set for text I/O, which is out of scope for an IETF language tag.