aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/global_objects/intl/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/javascript/reference/global_objects/intl/index.html
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/ko/web/javascript/reference/global_objects/intl/index.html')
-rw-r--r--files/ko/web/javascript/reference/global_objects/intl/index.html134
1 files changed, 134 insertions, 0 deletions
diff --git a/files/ko/web/javascript/reference/global_objects/intl/index.html b/files/ko/web/javascript/reference/global_objects/intl/index.html
new file mode 100644
index 0000000000..569fb94b80
--- /dev/null
+++ b/files/ko/web/javascript/reference/global_objects/intl/index.html
@@ -0,0 +1,134 @@
+---
+title: Intl
+slug: Web/JavaScript/Reference/Global_Objects/Intl
+tags:
+ - Internationalization
+ - Intl
+ - JavaScript
+ - Reference
+ - 국제화
+translation_of: Web/JavaScript/Reference/Global_Objects/Intl
+---
+<div>{{JSRef}}</div>
+
+<p><strong><code>Intl</code></strong> 객체는 각 언어에 맞는 문자비교, 숫자, 시간, 날짜비교를 제공하는, ECMAScript 국제화 API를 위한 이름공간입니다. {{jsxref("Collator")}}, {{jsxref("NumberFormat")}}, {{jsxref("DateTimeFormat")}}는 <code>Intl</code> 객체의 속성을 위한 생성자입니다. 이 페이지는 일반적인 국제화의 기능을 수행하는 객체의 생성자들과 언어를 구분하는 함수들 뿐만 아니라 이러한 속성들에 대해서도 다루고 있습니다.</p>
+
+<h2 id="속성">속성</h2>
+
+<dl>
+ <dt>{{jsxref("Collator", "Intl.Collator")}}</dt>
+ <dd>콜레이터 생성자입니다. 콜레이터 객체는 각 언어에 맞는 문자열 비교를 가능하게 해줍니다.</dd>
+ <dt>{{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}}</dt>
+ <dd>각 언어에 맞는 시간과 날짜 서식을 적용할 수 있는 객체의 생성자입니다.</dd>
+ <dt>{{jsxref("ListFormat", "Intl.ListFormat")}}</dt>
+ <dd>각 언어에 맞는 목록 서식을 적용할 수 있는 객체의 생성자입니다.</dd>
+ <dt>{{jsxref("NumberFormat", "Intl.NumberFormat")}}</dt>
+ <dd>각 언어에 맞는 숫자 서식을 적용할 수 있는 객체의 생성자입니다.</dd>
+ <dt>{{jsxref("PluralRules", "Intl.PluralRules")}}</dt>
+ <dd>각 언어에 맞는 복수형 규칙 및 단수 복수 구분 서식을 적용할 수 있는 객체의 생성자입니다.</dd>
+ <dt>{{jsxref("RelativeTimeFormat", "Intl.RelativeTimeFormat")}}</dt>
+ <dd>각 언어에 맞는 상대 시간 서식을 적용할 수 있는 객체의 생성자입니다.</dd>
+</dl>
+
+<h2 id="메서드">메서드</h2>
+
+<dl>
+ <dt>{{jsxref("Intl.getCanonicalLocales()")}}</dt>
+ <dd>표준 로케일 이름 목록을 반환합니다.</dd>
+</dl>
+
+<h2 id="로케일_식별과_조정">로케일 식별과 조정</h2>
+
+<p>The internationalization constructors as well as several language sensitive methods of other constructors (listed under {{anch("See_also", "See also")}}) use a common pattern for identifying locales and determing the one they will actually use: they all accept <code>locales</code> and <code>options</code> arguments, and negotiate the requested locale(s) against the locales they support using an algorithm specified in the <code>options.localeMatcher</code> property.</p>
+
+<h3 id="locales_매개변수"><code>locales</code> 매개변수</h3>
+
+<p>The <code>locales</code> argument must be either a string holding a <a href="http://tools.ietf.org/html/rfc5646">BCP 47 language tag</a>, or an array of such language tags. If the <code>locales</code> argument is not provided or is undefined, the runtime's default locale is used.</p>
+
+<p>A BCP 47 language tag identifies a language or locale (the difference between the two is fuzzy). In their most common form it can contain, in this order: a language code, a script code, and a country code, all separated by hyphens. Examples:</p>
+
+<ul>
+ <li><code>"hi"</code>: Hindi.</li>
+ <li><code>"de-AT"</code>: German as used in Austria.</li>
+ <li><code>"zh-Hans-CN"</code>: Chinese written in simplified characters as used in China.</li>
+</ul>
+
+<p>The subtags identifying languages, scripts, countries (regions), and (rarely used) variants in BCP 47 language tags can be found in the <a href="http://www.iana.org/assignments/language-subtag-registry">IANA Language Subtag Registry</a>.</p>
+
+<p>BCP 47 also allows for extensions, and one of them matters to the JavaScript internationalization functions: the <code>"u"</code> (Unicode) extension. It can be used to request a customization of the locale-specific behavior of a {{jsxref("Collator")}}, {{jsxref("NumberFormat")}}, or {{jsxref("DateTimeFormat")}} object. Examples:</p>
+
+<ul>
+ <li><code>"de-DE-u-co-phonebk"</code>: Use the phonebook variant of the German sort order, which expands umlauted vowels to character pairs: ä → ae, ö → oe, ü → ue.</li>
+ <li><code>"th-TH-u-nu-thai"</code>: Use Thai digits (๐, ๑, ๒, ๓, ๔, ๕, ๖, ๗, ๘, ๙) in number formatting.</li>
+ <li><code>"ja-JP-u-ca-japanese"</code>: Use the Japanese calendar in date and time formatting, so that 2013 is expressed as the year 25 of the Heisei period, or 平成25.</li>
+</ul>
+
+<h3 id="로케일_조정">로케일 조정</h3>
+
+<p>The <code>locales</code> argument, after stripping off all Unicode extensions, is interpreted as a prioritized request from the application. The runtime compares it against the locales it has available and picks the best one available. Two matching algorithms exist: the <code>"lookup"</code> matcher follows the Lookup algorithm specified in <a href="http://tools.ietf.org/html/rfc4647#section-3.4">BCP 47</a>; the <code>"best fit"</code> matcher lets the runtime provide a locale that's at least, but possibly more, suited for the request than the result of the Lookup algorithm. If the application doesn't provide a <code>locales</code> argument, or the runtime doesn't have a locale that matches the request, then the runtime's default locale is used. The matcher can be selected using a property of the <code>options</code> argument (see below).</p>
+
+<p>If the selected language tag had a Unicode extension substring, that extension is now used to customize the constructed object or the behavior of the function. Each constructor or function supports only a subset of the keys defined for the Unicode extension, and the supported values often depend on the language tag. For example, the <code>"co"</code> key (collation) is only supported by {{jsxref("Collator")}}, and its <code>"phonebk"</code> value is only supported for German.</p>
+
+<h3 id="options_매개변수"><code>options</code> 매개변수</h3>
+
+<p>The <code>options</code> argument must be an object with properties that vary between constructors and functions. If the <code>options</code> argument is not provided or is undefined, default values are used for all properties.</p>
+
+<p>One property is supported by all language sensitive constructors and functions: The <code>localeMatcher</code> property, whose value must be a string <code>"lookup"</code> or <code>"best fit"</code> and which selects one of the locale matching algorithms described above.</p>
+
+<h2 id="명세">명세</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES Int 1.0', '#sec-8', 'Intl')}}</td>
+ <td>{{Spec2('ES Int 1.0')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES Int 2.0', '#sec-8', 'Intl')}}</td>
+ <td>{{Spec2('ES Int 2.0')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES Int Draft', '#intl-object', 'Intl')}}</td>
+ <td>{{Spec2('ES Int Draft')}}</td>
+ <td>Added Intl.getCanonicalLocales in the 4th edition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+
+
+<p>{{Compat("javascript.builtins.Intl")}}</p>
+
+<h2 id="같이_보기">같이 보기</h2>
+
+<ul>
+ <li>소개글: <a href="http://norbertlindenberg.com/2012/12/ecmascript-internationalization-api/index.html">The ECMAScript Internationalization API</a></li>
+ <li>생성자
+ <ul>
+ <li>{{jsxref("Collator", "Intl.Collator")}}</li>
+ <li>{{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}}</li>
+ <li>{{jsxref("ListFormat", "Intl.ListFormat")}}</li>
+ <li>{{jsxref("NumberFormat", "Intl.NumberFormat")}}</li>
+ <li>{{jsxref("PluralRules", "Intl.PluralRules")}}</li>
+ <li>{{jsxref("RelativeTimeFormat", "Intl.RelativeTimeFormat")}}</li>
+ </ul>
+ </li>
+ <li>메서드
+ <ul>
+ <li>{{jsxref("String.prototype.localeCompare()")}}</li>
+ <li>{{jsxref("Number.prototype.toLocaleString()")}}</li>
+ <li>{{jsxref("Date.prototype.toLocaleString()")}}</li>
+ <li>{{jsxref("Date.prototype.toLocaleDateString()")}}</li>
+ <li>{{jsxref("Date.prototype.toLocaleTimeString()")}}</li>
+ </ul>
+ </li>
+</ul>