aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/http/headers/content-language/index.html
blob: b14724b515f18752df8eebf0bfe292f0008cfba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
title: Content-Language
slug: Web/HTTP/Headers/Content-Language
translation_of: Web/HTTP/Headers/Content-Language
---
<div>{{HTTPSidebar}}</div>

<p><strong><code>Content-Language</code></strong> {{Glossary("entity header")}}는 청중을 위한 언어를 설명하기 위해 사용되는데, 사용자가 선호하는 언어에 따라 사용자를 구분하도록 해줍니다.</p>

<p>예를 들어, "<code>Content-Language: de-DE</code>"가 설정되면, 이는 문서가 독일어 발표자를 위해 만들어졌음을 의미합니다(하지만, 그것이 문서가 독일어로 쓰여졌음을 나타내지는 않습니다. 예를 들어, 독일인 발표자를 위한 언어 코스의 일부분이 영어로 작성된 것일 수도 있습니다).</p>

<p><code>Content-Language</code>이 지정되지 않는다면, 모든 언어의 청중을 위해 만들어진 내용이라고 간주합니다. 다중 언어 태그 또한 가능한데다, 텍스트로 이루어진 문서 뿐만 아니라 여러 가지 미디어 타입에도 <code>Content-Language</code> 헤더가 적용됩니다.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("Entity header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>no</td>
  </tr>
 </tbody>
</table>

<h2 id="문법">문법</h2>

<pre class="syntaxbox">Content-Language: de-DE
Content-Language: en-US
Content-Language: de-DE, en-CA
</pre>

<h2 id="디렉티브">디렉티브</h2>

<dl>
 <dt><code>language-tag</code></dt>
 <dd>다중 언어 태그는 쉼표로 구분됩니다. 각 언어 태그는 하이프 문자("<code>-</code>", <code>%x2D</code>)로 구분되는, 한 개 이상의 대소문자를 구분하지 않는 서브태그의 연속입니다. 대부분의 경우, 언어 태그는 관련 언어군 (예를 들어, "<code>en</code>" = English)을 나타내는 주요 언어로 구성되는데, 그 뒤에는 해당 언어의 범위를 정제하거나 좁혀주는 d일련의 서브태그가 올 수 있습니다 (예, "<code>en-CA</code>" = 캐나다에서 사용되는 영어의 변종).</dd>
</dl>

<div class="note">
<p><strong>알아둘 것:</strong> 언어 태그는 공식적으로 <a href="https://tools.ietf.org/html/rfc5646">RFC 5646</a>에 정의되어 있으며, 그에 이어 사용될 <a href="https://en.wikipedia.org/wiki/Language_code">언어 코드</a>에 대해서 <a href="https://en.wikipedia.org/wiki/ISO_639">ISO 639</a> 표준이 있습니다(더 정확히는 <a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO 639-1 코드 목록</a>).</p>
</div>

<h2 id="예제">예제</h2>

<h3 id="문서가_작성된_언어_나타내기">문서가 작성된 언어 나타내기</h3>

<p>글로벌 <code><a href="/en-US/docs/Web/HTML/Global_attributes/lang">lang</a></code> 어트리뷰는 HTML 엘리먼트 상에서 전체 <a href="/en-US/docs/Web/HTML">HTML</a> 문서 혹은 그의 일부의 언어를 나타내기 위해 사용됩니다.</p>

<pre class="brush: html">&lt;html lang="de"&gt;</pre>

<p>다음과 같이 문서 언어를 나타내기 위해 이와 같은 메타 엘리먼트를 사용하지 <strong>마세요</strong>:</p>

<pre class="brush: html example-bad">&lt;!-- /!\ This is bad practice --&gt;
&lt;meta http-equiv="content-language" content="de"&gt;</pre>

<h3 id="리소스에_대해_대상_청중_나타내기">리소스에 대해 대상 청중 나타내기</h3>

<p><code>Content-Language</code> 헤더는 <strong>페이지의 대상 청중</strong>을 지정하는데 사용되며 한 개 이상의 언어를 나태낼 수 있습니다.</p>

<pre>Content-Language: de, en</pre>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">명세</th>
   <th scope="col">제목</th>
  </tr>
  <tr>
   <td>{{RFC("7231", "Content-Language", "3.1.3.2")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>

<p>{{Compat}}</p>

<h2 id="함께_참고할_내용">함께 참고할 내용</h2>

<ul>
 <li>{{HTTPHeader("Accept-Language")}}</li>
 <li>
  <p><a href="https://www.w3.org/International/questions/qa-http-and-lang.en">HTTP 헤더, 메타 엘리먼트 그리고 언어 정보</a></p>
 </li>
</ul>