Accept-Language
Request header Content

Overview

Accept-Language tells the server the natural languages (Korean, English, etc.) the user prefers, with priorities. Multilingual sites use it to decide which language of content to serve.

Details

The value lists BCP 47 language tags (`ko`, `ko-KR`, `en-US`, `zh-Hant`, ...) with `;q=` weights. For example `ko-KR,ko;q=0.9,en;q=0.8` prefers Korean first, then English. The server matches this list against the languages it can offer and picks the best, optionally reporting the served language in Content-Language.

Browsers generate this header automatically from the user's OS and browser language settings. Server-side negotiation usually honors an explicit choice (a URL path like `/ko/` or a cookie) first and uses Accept-Language mainly to guess a default on the first visit.

When responses vary by language, send `Vary: Accept-Language` so caches don't mix languages. Because the combinations are highly varied, cache hit rates can suffer, which is why path-based i18n (separate URLs) is often preferred in practice.

Syntax

Accept-Language: <lang-tag>[;q=<weight>][, ...]

e.g. Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7

Directives / values

<lang-tag>A BCP 47 language tag (e.g. ko, ko-KR, en-US, zh-Hant).
q=<0.0~1.0>Preference weight per language; defaults to 1.0.
*Wildcard matching any language not otherwise listed.

Notes

Related headers

Content-LanguageVaryAccept

Related status codes

Specification