An IETF language code (such as "en-US") is a combination of a primary language subtag such as "en" (which is an ISO 639 language code), and optionally a region subtag such as "US" (which is an ISO 3166-1 country code). The region subtag is only added when it is needed to make a distinction between the same language as spoken in different regions (en-US vs en-GB). So for a language such as Japanese, the tag would be simply "jp" instead of "jp-JP", since that language is only spoken predominantly in one country. There are additional optional subtags, such as the script to use for non-roman alphabets.
http://en.wikipedia.org/wiki/IETF_language_tag http://www.w3.org/International/articles/language-tags/ http://www.w3.org/International/questions/qa-choosing-language-tags http://www.rfc-editor.org/rfc/bcp/bcp47.txt