-
Notifications
You must be signed in to change notification settings - Fork 23
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
Aliasing languages in scoped context for a language map? #158
Comments
Terms expand to IRIs, so it's not possible to define an alias for "en-gb" which is anything other than an IRI. The exception is for aliases to keywords, so The algorithm does try to expand keys for all maps, including language maps, which is why |
Yup, agreed that we can't do it now (because I tried, and got the error :) ) but is it valuable enough to add it? |
I can sympathize with the argument that "en-gb" is not usable as a JS property, but I think that a general aliasing mechanism would add too much complexity. What about creating a special case for language maps, replacing all underscores in the keys by dashes (if I'm correct, BCP 47 tags can not contain underscores)? This does add complexity to the overall spec (but much smaller than a general alias mechanism), and it does create a backward incompatibility (but only for cases which are somehow invalid anyway). Also, we this would create round-tripping problems... Is it really worth it? |
Note also that it is always possible (although not as convenient) to use an index map: {
"@context": {
"label": { "@id": "http://example.org/label", "@container": "@index" }
},
"label": {
"en_gb": {
"@value": "hello",
"@language": "en-gb"
}
}
} |
This issue was discussed in a meeting.
View the transcriptlanguage aliasingRob Sanderson: link: #158 Rob Sanderson: Unless there are other people that are interested in this particular topic, I’m happy to close it. … We can alias @none to just none to get rid of @. Gregg Kellogg: Aliasing lets us alias IRIs and keywords, but that’s it. Gregg Kellogg: Because @none is a keyword, we can alias it but we can’t alias arbitrary string values. Rob Sanderson: Yes, the thought was if we wanted to let some way of aliasing more things then en-us could be aliased to en_us for example. But as Gregg said that means introducing a new feature to do this. Unless there’s interest, I’m ready to close. Proposed resolution: Close syntax #158 won’t fix, too complicated for the value gained (Rob Sanderson) Rob Sanderson: +1 Gregg Kellogg: +1 Ruben Taelman: +1 Ivan Herman: +1 Dave Longley: +1 Resolution #2: Close syntax #158 won’t fix, too complicated for the value gained David I. Lehn: +1 |
It's possible to alias
@none
tonone
in a scoped context of a language map, but should it also be possible to alias other language keys? For example, ifen-gb
was aliased toen_gb
, then it would be usable as a property in javascript.The text was updated successfully, but these errors were encountered: