HTTP headers | Content-Language
HTTP headers are used to provide additional information in HTTP request and HTTP response. HTTP headers Content-Language is used to define, which language speaker document is intended to. It doesn’t define the language of the document. In case this header is not specified, it is assumed that the document is intended for all language speakers.
- When only one language is specified
- When multiple languages are specified
Content-Language: <language-tag>, <language-tag>, <language-tag>
- language-tag: It is the case-insensitive directive which defines the language. Generally, it consists of two parts. First part defines the primary language which defines a broad family of related languages (e.g., “en” = English) and the optional second part which is separated by “-” and used to narrow the language range.
- It says that English speakers are the intended audience of the page.
- It says that German and English speakers are the intended audience of the page.
Content-Language: de, en
To check the Content-language in action go to Inspect Element -> Network check the request header for content-language like below.
Supported Browsers: The browsers compatible with HTTP headers Content-language are listed below:
- Google Chrome
- Internet Explorer