What ISO standard does MB use for language codes?

Tags: #<Tag:0x00007fe3152a3168>

Does MB use the ISO 639-2 Part 2T codes or the ISO 639-3 codes for the available list? They are almost identical, but from what I’ve found it looks like the 639-3 list is shorter.

The Release document says this:

1 Like

Thanks, I saw that.

But does it include all 8,194 codes listed on Wikipedia (minus the few that are obsolete) or is it a subset of those codes? It appears that the list on MB might only be using those codes that are listed as ISO 639-2T codes (just under 300 in number). I just don’t want to include the full list of 8,000+ codes in the plugin if there’s less than 300 that will every possibly be used.

Only a subset is there, with more getting added as they are requested.

SELECT iso_code_3, iso_code_2t, iso_code_2b, iso_code_1, name FROM musicbrainz.language ORDER BY iso_code_3 gives:

1 Like

Excellent! Thank-you.

Edit: Just one more thing to confirm… MB only stores and serves the language name in English, right? There is no translation to other languages based on culture settings.

Are the tables for the work langues and the release languages exactly the same?
(there seem to be subtle differences in the purpose and features of the different iso tabels, so I tought to aks to prevent possible issues down the road)

Per se. In any database references they’re stored as id numbers (one of two columns in the language table not included in the SQL→CSV dump), and in the language table they only have the English name given (as seen by the above dump), which is what then gets fed to the MusicBrainz server… However, both musicbrainz-server and Picard (I think at least?) use the “musicbrainz.languages” resource to translate language names to non-(US )English locales, so you may see the languages listed in another (eh…) language, if you browse the site in, say, Dutch or German.


As far as I am aware. @bitmap or @yvanzo or @reosarevok may be able to give a more qualified answer.

IIRC they are the same, except we turn [No linguistic content] into [No lyrics] for display at the work lyrics level.

1 Like

Of course. That makes perfect sense. I must have been half asleep when I asked that question. :blush: