http-headers Accept-Language: (Request)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Accept-Language tells the server what language (such as English) does the client accept.

Syntax

  • Accept-Language: Language;QualityFactor
  • Accept-Language: Language;QualityFactor, Language;QualityFactor, ...
  • Accept-Language: *

Parameters

ParameterDescription
LanguageWhat language is acceptable.
QualityFactorThe quality factor in the format ;q=0.8 (optional)
*Match any language

Remarks

Accept-Language takes a number of languages and includes an optional preference for which one the server should use. The language is one from the list of available at IANA Language Subtag Registry page. For example en is English, and en-US is USA English.

The language is separated by commas with an optional quality factor (using a ;q=) that is used the clients preference for using this language. The quality factor has a value from 0 to 1 with the higher the number the more preference for that language.

If this header is not included then the client will accept any language.

The server uses Content-Language to inform the client what langauge it is using.



Got any http-headers Question?