# Language tag - Title language or Lyrical language?

**URL:** <https://discourse.beets.io/t/language-tag-title-language-or-lyrical-language/875>\
**Category:** Help\
**Created:** [August 15, 2019, 2:21am UTC](https://discourse.beets.io/t/language-tag-title-language-or-lyrical-language/875 "2019-08-15T02:21:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![beetz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/beetz/32/280_2.png) [@beetz](https://discourse.beets.io/u/beetz)\
**Post date:** [August 15, 2019, 2:21am UTC](https://discourse.beets.io/t/language-tag-title-language-or-lyrical-language/875/1 "2019-08-15T02:21:19Z")

</div>

MusicBrainz makes a distinction between a release’s

- title language, and its
- lyrical language

See: [https://musicbrainz.org/doc/Release](https://musicbrainz.org/doc/Release)

This is probably because they can differ, and I recently found out that it happens more often than I thought.

I believe beets currently fetches the release’s title language as opposed to the work’s lyrical language, although the latter would be more useful – I like to classify my music by lyrical language first, then by genre; the title language almost never matters.

In other words, I would like to avoid having beet move non-English songs in the English directory based on their English title, and have it refer to the work’s lyrical language instead.

Is this tag already implemented in beets? If not, where can I implement it myself?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [August 15, 2019, 3:29pm UTC](https://discourse.beets.io/t/language-tag-title-language-or-lyrical-language/875/2 "2019-08-15T15:29:19Z")

</div>

Not currently implemented, no. I’m glad you’re interested in trying to add it! The place where we pull stuff out of the MB web service is in `mb.py`:

> <https://github.com/beetbox/beets/blob/master/beets/autotag/mb.py>

For example, here’s where we get the current language field:

> <https://github.com/beetbox/beets/blob/27e0e7600d05fd7d2e36124b803120ea5cb9e3d4/beets/autotag/mb.py#L403>

---

<div class="post-metadata">

**Author:** ![Moonbase59](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/moonbase59/32/299_2.png) [@Moonbase59](https://discourse.beets.io/u/Moonbase59)\
**Post date:** [September 23, 2019, 11:28am UTC](https://discourse.beets.io/t/language-tag-title-language-or-lyrical-language/875/3 "2019-09-23T11:28:15Z")

</div>

This is actually an ever-going question on MusicBrainz. I’m also an editor there and mainly use Picard for tagging.

There is the release’s (album’s) language and script, which denotes the language and script the titles are _written_ in _on the cover/booklet_.

Then there is the language field _per track_ that denotes the language _sung in the song_ (i.e., lyrics), an _ISO-639-3_ terminological 3-letter code (i.e., “deu” for German). These codes have been extended by the four special codes [mis], [mul], [und], [zxx] to be used for _uncoded language_, _multiple languages_, _undetermined_ and _instrumental_.

The latter are usually coded in the _work_, and (sadly) often not available in MusicBrainz. These would go into the “item” (i.e., track) in beets and _could_ be multivalue fields (i.e. separate tags multiple times in Ogg Vorbis comments and ID3v2.4, or separated by the selected separation character(s) in ID3v2.3 (i.e. “deu; eng”, “deu/eng”, “deu,eng”, “deu(NUL)eng”, etc. for a song that contains _both_ German and English lyrics—using “mul” is sometimes not wanted).

If they aren’t available (yet) in MusicBrainz, I usually tag these manually when tagging a new album, because I sometimes need search functionality like “1990s songs sung in Swedish from a female-fronted Swedish hard rock group”.

So yes, it’d be great if beets would support the (lyrics) language(s) per track!

I advise not to blindly overwrite existing language tags from the MusicBrainz data—this could easily destroy collections like mine (almost 150,000 tracks, about 80-85% language-tagged, where MusicBrainz would only deliver about 10-15% of the language tags).

---

<div class="post-metadata">

**Author:** ![Moonbase59](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/moonbase59/32/299_2.png) [@Moonbase59](https://discourse.beets.io/u/Moonbase59)\
**Post date:** [September 30, 2019, 8:32pm UTC](https://discourse.beets.io/t/language-tag-title-language-or-lyrical-language/875/4 "2019-09-30T20:32:38Z")

</div>

@adrian: Should this be in MediaFile? I could probably come up with a PR adding the track (=lyrics) language tags.

EDIT: Oops, already in there, it seems. 😁
