Re: [bp-i18n-specdev] Valid or well-formed language tags? (#36)

I realize user agents probably don’t care about all of the parts of the tag, but there’s no lenience between strict adherence and no checking, and that still makes picking one over the other hard to assess (at least for me!).

If we only say that tags be well-formed, then, as I understand it, I can write this:

```
“@context”: {
     “language”: “em”
}
``` 
instead of “en”, and it won't result in a warning because it’s well formed.

The problem here is that it leads to subtle bugs. The only indication of a mistake may come when a user agent fails to load a dictionary or preload a tts engine, for example, which may not be realized until a publication has already reached the user.

If we chose strict validity, then every subtag has to be valid, and I agree that in most cases it's not information that the user agent cares about. For us, it's probably also information that isn't going to be specified or checked.

But given the two extremes, it seems more practical to warn users about the language being invalid, even if the rest of the subtags go unexamined. How do we go about this, though?

Is it reasonable to assert well-formedness and also require a valid language as an additional requirement?

-- 
GitHub Notification of comment by mattgarrish
Please view or discuss this issue at https://github.com/w3c/bp-i18n-specdev/issues/36#issuecomment-530840811 using your GitHub account

Received on Thursday, 12 September 2019 14:02:30 UTC