Device.language
The browser or device language as a two-letter ISO 639-1 code, such as "en" or "de". Present since OpenRTB 2.0.
Field facts
- Path
device.language- Object
- Device
- Type
- string
- Requirement
- Optional
- Added
- OpenRTB 2.0
- Spec section
- 3.2.18
How it is used
Use lowercase two-letter codes only. A tag that includes a region or script, such as "en-US", belongs in device.langb, and only one of the two should be present.
Example
Where the field sits in a payload, with everything else left out:
{
"id": "req-1",
"device": {
"language": "en"
}
}Common mistakes
- Sending a locale such as "en-US" or "en_US" here. Those are not ISO 639-1 codes.
- Sending both
languageandlangb, which the validator reports as mutually exclusive.
Version history
Added in OpenRTB 2.0, and present in the latest snapshot. The table shows how each version's spec text types the field.
| Versions | Type in the spec | Required | Deprecated |
|---|---|---|---|
| 2.0 to 2.2 | string | No | No |
| 2.3 to 2.3.1 | string | No | No |
| 2.4 | string | No | No |
| 2.5 to 2.6-202606 | string | No | No |