HTTP headers | AcceptLanguage (original) (raw)

HTTP headers | Accept-Language

Last Updated : 12 Jul, 2025

This HTTP Accept-Language header tells the server about all the languages that the client can understand. With the help of content negotiation, there will be a set of supported languages in the HTTP Accept-Language proposal then the server selects one of the proposals of those languages and place that in the content-language header. In a few cases users can change the languages manually otherwise server detects the supported language by the browser's language. But remember one thing that it is recommended that the server never overrides an explicit decision. If the user is comfortable with a language that does not list on the server language then the server can not serve the matching language to the client in that case 406 Not Acceptable status code will be sent.Syntax:

Note: Multiple languages can be listed by using commas and the optional.Directives: This header accepts two directives as mentioned above and described below:

Note: The ;q= it defines the factor weighting, value placed in an order of preference expressed using a relative quality valueExamples:

To check this Accept-Language in action go to Inspect Element -> Network check the request header for Accept-Language like below, Accept-Language is highlighted you can see. Supported Browsers: The browsers are compatible with HTTP Accept-Language header are listed below: