Related Articles

Related Articles

HTTP headers | Content-Language
  • Last Updated : 23 Oct, 2019

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.

Syntax:

  • When only one language is specified
    Content-Language: <language-tag>
    
  • When multiple languages are specified
    Content-Language: <language-tag>, <language-tag>, <language-tag>
    

Directive:

  • 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.

Example:

  • It says that English speakers are the intended audience of the page.
    Content-Language: en
  • 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
  • Firefox
  • Safari
  • Opera
My Personal Notes arrow_drop_up
Recommended Articles
Page :