lang Attribute BCP-47 Checker
Bounded BCP47 syntax including extlangs, scripts/regions, variants, extensions/private use and grandfathered tags; no IANA registration or content-language detection.
Description
lang Attribute BCP-47 Checker: return well formed syntax, registered subtags verified.
A language tag combines a language identifier with optional subtags. Well-formed syntax and registration of the individual subtags are separate checks.
This tool returns well formed syntax, registered subtags verified. Use the stated units and model convention when interpreting these fields.
When to use this tool
Use this tool when the supplied inputs match the specific operation described above and you need a repeatable result under its stated convention.
- Check the supported input and output contract against an existing calculation or observation.
- Use the complete example to confirm units, selector spelling and result interpretation.
How to use the tool and how it works
- Enter every field in the input table using the stated units and the exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
Parse the bounded BCP-47-style structure, including grandfathered forms, private use, script, region, variants and extensions. Reject duplicate variants or extension singletons and invalid subtag shapes.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| languageTag | Language tag. | Text |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.wellFormedSyntax | Well formed syntax flag under the exact conditions described above. |
| result.registeredSubtagsVerified | Always false; tag registration is outside the syntactic check. |
{
"input": {
"languageTag": "en-US"
},
"output": {
"result": {
"wellFormedSyntax": true,
"registeredSubtagsVerified": false
}
}
} Limitations and assumptions
- registeredSubtagsVerified stays false. A syntactically well-formed tag is not proof that every subtag is registered or appropriate for the text.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
Check the underlying observations, units and conventions independently before using the result in a larger workflow. The tools listed below address nearby tasks; compare their inputs and scope before substituting one for this operation.
References
Similar or alternative tools
- aria state attribute pair checker
ARIA states expose changing interface conditions through defined attribute/value tokens.
- attribute parser
An HTML start tag has a name and attributes whose lexical spelling can differ from browser-decoded values.