---
id: "languagetag"
kind: "datatype"
status: "stable"
is_pii: false
categories: ["geo"]
langs: ["common"]
quality: 95
url: "http://registry.apicrafter.io/datatype/languagetag"
---

# IETF language tag (`languagetag`)

An IETF BCP 47 language tag is a standardized code or tag that is used to identify human languages in the Internet. The tag structure has been standardized by the Internet Engineering Task Force (IETF) in Best Current Practice (BCP) 47; the subtags are maintained by the IANA Language Subtag Registry.

- Personal data (PII): no
- Categories: Geographic identifiers (geo)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^(?:[a-z]{2,3}(?:-[a-zA-Z0-9]{1,8})*|i-[a-z]{3,8})$
```

## Examples

- `hu` — Hungarian
- `en-GB` — British English

## Mappings

- bioregistry: `ietf.language`
- cdm: `means.reference.language.tag`
- schema_org: `inLanguage`
- wikidata: `P305`

## Metacrafter rules

1 rules: 0 match the field name, 1 match values.

- `languagetag` (data, `common/intcodes.yaml`)

## Supported by tools

- `metacrafter`
- `metacrafterpro`

## Translations

- ru: Языковой код IETF: Языковой код/тэг по стандарту IETF BCP 47 идентифицирующий конкретный человеческий язык, стиль написания и тд.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/IETF_language_tag>
- wikidata: <https://www.wikidata.org/wiki/Property:P305>

## Quality

Score 95/100. Missing: negative example.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/languagetag.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/languagetag.yaml>
