Closed dissolve closed 9 years ago
well... the hreflang can be useful when a resource is available in multiple languages and you want to advertise that fact... for instance:
{
"@context": "http://www.w3.org/ns/activitystreams",
"@type": "Note",
"url": [
{
"@type": "Link",
"href": "http://example.org/en/notes/123",
"hreflang": "en"
},
{
"@type": "Link",
"href": "http://example.org/es/notes/123",
"hreflang": "es"
}
]
}
As such, it's primary use is as a selector for filtering options. Now, whether or not that's useful enough to justify it being in the core vocab is an entirely different question. I would point out, however, that hreflang
is part of both the Web Linking and HTML5 spec definitions for a link so it's likely worthwhile keeping for feature parity.
Filtering by using "hreflang" could be a problem. See for example the attachments: http://www.w3.org/TR/activitystreams-vocabulary/#dfn-attachment
I guess it is possible to attach more than one picture. Then you maybe attach 3 pictures. One is marked as "es", two are marked as "en". What should the receiver do? Should he filter out the two "en" marked pictures since the receiver is speaking spanish only? Or maybe one of the as "en" marked pictures is the sibling of one of the "es" marked pictures and the other one is neutral? This could be very confusing. So it would maybe better to remove "hreflang" for now.
Why would filtering by hreflang be a problem? Keeping in mind that (a) implementations (both publishing and consuming) can easily ignore them if they don't have need to use them and (b) hreflang is included in the linking models implemented in HTML, Atom, and Link Headers. The hreflang property may not be useful in every case, but it adds no additional complexity that cannot be easily ignored and as the example I gave above demonstrates, it does have practical uses.
What I wanted to say: It would be great to offer language depending content where the receiver could decide between different page links or pictures. But to make that work reliable we had to group these links (comparable to what is done with "displayName").
Without this possibility the "hreflang" is an interesting option but should not be used for filtering content by language.
WG decided to keep hreflang fow now but mark it at risk.
hreflang only provides a hint to the language of a resource, does not seem terribly useful as you should be able to determine lang when you actually need it, when you fetch the resource.