Skip to content

Commit ae6d094

Browse files
authored
Define both RFC 3066 an RFC 5646 language tags (#45)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent c817f14 commit ae6d094

5 files changed

Lines changed: 504 additions & 3 deletions

File tree

README.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ expressed as JSON Schema definitions.
5252
|--------------|----------|-------|
5353
| IEEE | [IEEE Std 754-2019](https://ieeexplore.ieee.org/document/8766229) | IEEE Standard for Floating-Point Arithmetic |
5454
| IEEE | [IEEE Std 1003.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/) | IEEE Standard for Information Technology—Portable Operating System Interface (POSIX) Base Specifications, Issue 7 |
55+
| IETF | [RFC 3066](https://www.rfc-editor.org/rfc/rfc3066) | Tags for the Identification of Languages |
5556
| IETF | [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) | Uniform Resource Identifier (URI): Generic Syntax |
5657
| IETF | [RFC 4648](https://www.rfc-editor.org/rfc/rfc4648) | The Base16, Base32, and Base64 Data Encodings |
5758
| IETF | [RFC 4918](https://www.rfc-editor.org/rfc/rfc4918) | HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "RFC 3066 Language Tag",
4+
"description": "A language tag conforming to language tags at the syntax level only",
5+
"examples": [
6+
"en",
7+
"en-US",
8+
"de-DE",
9+
"fr-FR",
10+
"ja",
11+
"zh-CN",
12+
"es-MX",
13+
"i-navajo",
14+
"x-private",
15+
"en-US-x-twain"
16+
],
17+
"deprecated": true,
18+
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
19+
"x-links": [ "https://www.rfc-editor.org/rfc/rfc3066.html" ],
20+
"type": "string",
21+
"not": {
22+
"$comment": "Cannot contain whitespace or control characters",
23+
"pattern": "[\\s]"
24+
},
25+
"pattern": "^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$"
26+
}

schemas/ietf/language/tag-syntax.json renamed to schemas/ietf/language/5646/tag-syntax.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"title": "RFC 5646 BCP 47 Language Tag",
4-
"description": "A language tag conforming to language tag full syntax at the syntax level only",
3+
"title": "RFC 5646 Language Tag (BCP 47)",
4+
"description": "A language tag conforming to language tags at the syntax level only",
55
"examples": [
66
"en",
77
"en-US",

0 commit comments

Comments
 (0)