From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../global_objects/intl/locale/index.html | 77 ++++++++++++++++++++++ .../global_objects/intl/locale/language/index.html | 62 +++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 files/ko/web/javascript/reference/global_objects/intl/locale/index.html create mode 100644 files/ko/web/javascript/reference/global_objects/intl/locale/language/index.html (limited to 'files/ko/web/javascript/reference/global_objects/intl/locale') diff --git a/files/ko/web/javascript/reference/global_objects/intl/locale/index.html b/files/ko/web/javascript/reference/global_objects/intl/locale/index.html new file mode 100644 index 0000000000..a768a8bb5d --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/intl/locale/index.html @@ -0,0 +1,77 @@ +--- +title: Intl.Locale +slug: Web/JavaScript/Reference/Global_Objects/Intl/Locale +tags: + - Internationalization + - Intl + - JavaScript + - NeedsTranslation + - Reference + - TopicStub +translation_of: Web/JavaScript/Reference/Global_Objects/Intl/Locale +--- +
{{JSRef}}
+ +

The Intl.Locale constructor is a standard built-in property of the Intl object that represents a Unicode locale identifier.

+ +

{{EmbedInteractiveExample("pages/js/intl-locale.html")}}

+ +

Syntax

+ +
new Intl.Locale(tag [, options])
+ +

Parameters

+ +
+
tag
+
The Unicode locale identifier string.
+
options
+
An object that contains configuration for the Locale. Keys are Unicode locale tags, values are valid Unicode tag values.
+
+ +

Description

+ +

The Intl.Locale object was created to allow for easier manipulation of Unicode locales. Unicode represents locales with a string, called a locale identifier. The locale identifier consists of a language identifier and extension tags. Language identifiers are the core of the locale, consisting of languagescript, and region subtags. Additional information about the locale is stored in the optional extension tags. Extension tags hold information about locale aspects such as calendar type, clock type, and numbering system type.

+ +

Traditionally, the Intl API used strings to represent locales, just as Unicode does. This is a simple and lightweight solution that works well. Adding a Locale class, however, adds ease of parsing and manipulating the language, script, and region, as well as extension tags.

+ +

The Intl.Locale object has the following properties and methods:

+ +

Properties

+ +
+
{{jsxref("Locale.prototype", "Intl.Locale.prototype")}}
+
The prototype object for the Locale constructor.
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
Intl.Locale proposalStage 3
+ +

Browser compatibility

+ +
+ + +

{{Compat("javascript.builtins.Intl.Locale")}}

+
+ +

See also

+ + diff --git a/files/ko/web/javascript/reference/global_objects/intl/locale/language/index.html b/files/ko/web/javascript/reference/global_objects/intl/locale/language/index.html new file mode 100644 index 0000000000..195b2a06a0 --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/intl/locale/language/index.html @@ -0,0 +1,62 @@ +--- +title: Intl.Locale.prototype.language +slug: Web/JavaScript/Reference/Global_Objects/Intl/Locale/language +translation_of: Web/JavaScript/Reference/Global_Objects/Intl/Locale/language +--- +
{{JSRef}}
+ +
+ +

Intl.Locale.prototype.language 속성은 locale과 관련된 언어를 반환하는 접근자 속성입니다.

+ +

Description

+ +

언어는 locale의 핵심 기능 중 하나입니다. 유니 코드 사양은 locale의 언어 식별자를 언어와 지역으로 함께 취급합니다 (예를 들어 영국 영어와 미국 영어 등의 방언과 변형을 구별하기 위해). {{jsxref("Locale", "Locale")}}의 language 속성은 로캘의 언어 하위 태그를 엄격하게 반환합니다.

+ +

Examples

+ +

locale 식별자 문자열 인수에서 언어 설정

+ +

유효한 유니 코드 locale 식별자가 되려면 문자열이 언어 하위 태그로 시작해야합니다. {{jsxref("Locale", "Locale")}} 생성자에 대한 주요 인수는 유효한 유니 코드 locale 식별자여야하므로 생성자가 사용될 때마다 언어 하위 태그가있는 식별자를 전달해야합니다.

+ +
let langStr = new Intl.Locale("en-Latn-US");
+
+console.log(langStr.language); // Prints "en"
+ +

configuration 객체로 언어 오버라이딩 하기

+ +

언어 하위 태그를 지정해야하지만 {{jsxref("Locale", "Locale")}} 생성자는 언어 하위 태그를 재정의 할 수있는 구성 개체를 사용합니다.

+ +
let langObj = new Intl.Locale("en-Latn-US", {language: "es"});
+
+console.log(langObj.language); // Prints "es"
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
Intl.Locale.prototype.language proposalStage 3
+ +

Browser compatibility

+ +
+ +{{Compat("javascript.builtins.Intl.Locale.language")}}
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf