r12a / app-subtags Goto Github PK
View Code? Open in Web Editor NEWBCP 47 language tags are built from subtags in the IANA Subtag Registry. This tool helps you find or look up subtags and check for errors in language tags.
BCP 47 language tags are built from subtags in the IANA Subtag Registry. This tool helps you find or look up subtags and check for errors in language tags.
I would like to be able to see all entries which have changed since a given date. I'm not sure if it's possible to identify all changes using only the registry, but it should be possible to show those which were added or deprecated.
There a new version of the registry with multiple changes and additions:
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Stumbled upon this since tok
was missing
Hi, I've been using the app-subtags web page to develop my understanding of BCP 47, and it has been very helpful; thank you.
Today I've been looking at extension subtags, and it seems that either (a) I've misunderstood BCP 47, or (b) app-subtags is "too generous" in accepting some uses of extensions.
The removeExtensions()
function seems to assume that there is at most one extension, and this leads to some problems with the parsing.
So app-subtags accepts the following tag as well-formed, when, I think, based on RFC 5646, section 2.2.6, it should reject it:
tlh-t-u-foo
: "Each singleton MUST be followed by at least one extension subtag" (RFC 5646, section 2.2.6, point 6). This tag is not "well-formed" according to the definition of well-formedness in section 2.2.9, since the tag does not conform to the ABNF in section 2.1. app-subtags incorrectly parses this as "the extension t-u-foo".The following are well-formed, since they conform to the ABNF, but there is an opportunity for app-subtags to be "more helpful" in pointing out errors:
en-t-aaa-a-bbb
: "The singleton MUST be one allocated to a registration authority via the mechanism described in Section 3.7 ..." (RFC 5646, section 2.2.6, point 2). The app-subtags code does already check that the singleton t
is valid, but then doesn't "notice" that a-
is the beginning of another extension, and check the singleton a
.en-t-bbb-t-ccc
: "Each singleton subtag MUST appear at most one time in each tag (other than as a private use subtag)" (RFC 5646, section 2.2.6, point 3). Ditto, and as you parse, you have to keep track of which singletons you've seen, and make sure there aren't duplicates.Hello
I noticed that on https://r12a.github.io/app-subtags/ sub-tags such as Latn and geographical regions such as FR are in lower case (in the brown/grey bars).
I don't really know the importance of case in IETF codes, but if is is, it might be a good thing to use the appropriate case.
Best regards, Olivier.
Private use codes such as XA
which are defined as part of code ranges are not recognised, whereas those like AA
which are not part of ranges work fine.
Works:
https://r12a.github.io/app-subtags/index?lookup=AA
Type: region
Subtag: AA
Description: Private use
Added: 2005-10-16
Does not work:
https://r12a.github.io/app-subtags/index?lookup=XA
Type: region
Subtag: XA..XZ
Description: Private use
Added: 2005-10-16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.