What ISO standard does MB use for language codes?

musicbrainz
Tags: #<Tag:0x00007f2a0b5020a8>

#1

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.


A script to write a song's full language instead of it's abbreviation?
#2

The Release document says this:


#3

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.


#4

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:


#5

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.


#6

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)


#7

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.


#8

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


#9

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


#10

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