Back to HTTP Headers
Request

HTTP Accept-Language Header

Indicates which natural languages the client prefers. The server uses this for content negotiation to return the appropriate language version.

Purpose

Allows servers to serve localized content based on the user's language preferences.

Accept-Language: en-US Accept-Language: fr, en;q=0.9 Accept-Language: ar;q=1.0, en;q=0.5

Code Examples

See how to use the Accept-Language header in different tools and languages.

curl -H "Accept-Language: ar" https://api.example.com
document
curl -H "Accept-Language: fr, en;q=0.9" https://api.example.com/page

Related Headers

Test Your APIs

accept-language headerhttp accept-languagehttp headers guide