Displaying 1 to 4 from 4 results

bcp-47 - Parse and stringify BCP 47 language tags

  •    Javascript

Parse and stringify BCP 47 language tags.Parse a BCP 47 tag into a language schema. Note that the algorithm is case-insensitive.

locale2 - 💪 Try as hard as possible to detect the client's language tag ("locale") in node or the browser

  •    Javascript

A language tag is composed from a sequence of one or more "subtags", each of which refines or narrows the range of language identified by the overall tag. Subtags, in turn, are a sequence of alphanumeric characters (letters and digits), distinguished and separated from other subtags in a tag by a hyphen ("-", [Unicode] U+002D).

language-subtag-registry - BCP 47/IANA language subtag data in JSON format.

  •    Javascript

IANA's official repository is in record-jar format and is hard to parse. This project provides neatly organized JSON files representing that data. See lib/data/ for all the JSON files available. The registry.json file contains all records in a flat array and meta.json contains its metadata. There's a separate JSON file for each 'scope' (e.g. macrolanguage.json) and 'type' (e.g. language.json). These files contain JSON objects keyed by tag or subtag and with the index integer for the corresponding entry in registry.json as a value. This makes lookups fast.

language-tags - A Swiss Army knife for language tags.

  •    Javascript

Based on BCP 47 (RFC 5646) and the latest IANA language subtag registry. This project will be updated as the standards change.