Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Language code list from ISO 639 to IETF BCP 47 #573

Open
mscuthbert opened this issue Jan 30, 2025 · 1 comment
Open

Change Language code list from ISO 639 to IETF BCP 47 #573

mscuthbert opened this issue Jan 30, 2025 · 1 comment
Milestone

Comments

@mscuthbert
Copy link
Contributor

Similar to MNX Issue:

w3c/mnx#363

Since the Second Edition (2000) of XML 1.0, XML no longer uses ISO 639 for language codes, and has since the Fifth Edition (2008) endorsed IETF BCP 47 for language codes:

5th edition changes (Search for 2.12)
https://www.w3.org/TR/xml/REC-xml-20081126-review.html

2nd edition changes (Search for 2.12)
https://www.w3.org/TR/2000/REC-xml-20001006-review.html

Practically speaking it means that a well-formed MusicXML document can now have language-country codes that are not two-letters followed by a hyphen followed by two more letters (BCP 47 allows for three-letter language codes as well as custom 5-8 letter tags (four seems to be out??)). Sublanguage tags can be numeric (es-419 = Latin American Spanish), and writing systems can be specified in a third tag.

Proposed changes:

Note that for backwards compatibility, the xmlns:xs still points to 2001.

  • Update the documentation for the deprecated directive element in attributes.mod and musicxml.xsd

Even though it is deprecated, I think it is still better to use one set of language codes for the entire document. Since other elements that support the xml:lang attribute do not specify the format of xml:lang in their documentation, proposing the simply delete the line Language names come from ISO 639, with optional country subcodes from ISO 3166. without replacing it with anything else.

  • Update the documentation for lyric in note.mod and musicxml.xsd (including 'text-element-data')

Again, remove Language names for text elements come from ISO 639, with optional country subcodes from ISO 3166. letting that be documented by documentation for the current version of xml:lang instead.

Not Changed/Open for Discussion for later changes:

Default language for some musicxml elements with xml:lang is marked as Italian it -- It is legal to have a language without a subtag, however, it is most common to have a subtag. So this could be changed to it-IT (it-CH is the only other defined subtag for Swiss Italian), but I think better to leave it alone (besides, most of us write in the hypothetical it-music where words like presto mean something different than in normal Italian today).

For discussion: there are a number of places in the MusicXML schema(s) that now have xml:lang without specifying a default. Should the specs be made consistent so that all parts of the system using xml:lang have Italian as a default or left unspecified as currently?

@mscuthbert mscuthbert added this to the V4.1 milestone Jan 30, 2025
@samuelbradshaw
Copy link

samuelbradshaw commented Jan 30, 2025

BCP 47 recommends using the shortest code that is sufficient for the use case, and to not include additional subtags if they're not needed – see
https://www.w3.org/International/questions/qa-choosing-language-tags#langsubtag

So it would be appropriate for generic Italian, and you would only need it-IT if you want to distinguish it from it-CH (for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants