Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ko] Intl.DateTimeFormat.supportedLocalesOf() 신규번역 외 #22346

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[ko] Intl.DateTimeFormat.supportedLocalesOf() 신규번역 외
- Intl.DateTimeFormat.supportedLocalesOf() 신규 번역
- String.prototype.trimEnd() 최신 동기화
  • Loading branch information
wisedog committed Jul 14, 2024
commit 865c323a47b1848bec6dd0722d68bfb3c6bd0cb3
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Intl.DateTimeFormat.supportedLocalesOf()
slug: Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/supportedLocalesOf
l10n:
sourceCommit: 5c3c25fd4f2fbd7a5f01727a65c2f70d73f1880a
---

{{JSRef}}

**`Intl.DateTimeFormat.supportedLocalesOf()`** 정적 메서드는 런타임의 기본 로케일로 돌아갈 필요 없이 날짜 및 시간 서식 지정에서 지원되는 제공된 로케일을 포함하는 배열을 반환합니다.

{{EmbedInteractiveExample("pages/js/intl-datetimeformat-supportedlocalesof.html", "shorter")}}

## 구문

```js-nolint
Intl.DateTimeFormat.supportedLocalesOf(locales)
Intl.DateTimeFormat.supportedLocalesOf(locales, options)
```

### 매개변수

- `locales`
- : BCP 47 언어 태그가 포함된 문자열 또는 이러한 로케일 식별자의 배열입니다. `locales` 인수의 일반적인 형식과 해석에 대해서는 [`Intl` 메인 페이지의 매개변수 설명](/ko/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument)을 참조하세요.
- `options` {{optional_inline}}
- : 다음의 속성을 가질 수 있는 객체
- `localeMatcher`
- : 사용할 로케일 일치 알고리즘입니다. 가능한 값은 `"lookup"` 및 `"best fit"`이며, 기본값은 `"best fit"`입니다. 이 옵션에 대해 더 알고 싶으시다면 {{jsxref("Intl", "Intl", "#locale_identification_and_negotiation", 1)}} 페이지를 참고하시기 바랍니다.

### 반환 값

런타임의 기본 로케일로 되돌아가지 않고 상대 시간 형식으로 지원되는 지정된 로케일 태그의 하위 집합을 나타내는 문자열 배열입니다.

## 예제

### supportedLocalesOf() 사용하기

인도네시아어와 독일어는 지원하지만 날짜 및 시간 서식에서 인도네시아어는 지원하지 않는 런타임을 가정하면 `supportedLocalesOf`는 인도네시아어와 독일어 언어 태그를 변경하지 않고 반환하지만 `pinyin` 콜레이션은 날짜 및 시간 서식과 관련이 없거나 인도네시아어에서 사용되며 인도네시아에 특화된 독일어는 지원되지 않을 가능성이 높습니다. 여기서 `"lookup"` 알고리즘의 명세에 유의하세요. 대부분의 인도네시아어 사용자가 인도네시아어도 이해하므로 `"bestfit"` 일치기는 인도네시아어가 발리어와 적절히 일치한다고 판단하여 발리어 태그도 반환할 수 있습니다.

```js
const locales = ["ban", "id-u-co-pinyin", "de-ID"];
const options = { localeMatcher: "lookup" };
console.log(Intl.DateTimeFormat.supportedLocalesOf(locales, options));
// ["id-u-co-pinyin", "de-ID"]
```

## 명세서

{{Specifications}}

## 브라우저 호환성

{{Compat}}

## 같이 보기

- {{jsxref("Intl.DateTimeFormat")}}
Original file line number Diff line number Diff line change
@@ -1,45 +1,50 @@
---
title: String.prototype.trimEnd()
slug: Web/JavaScript/Reference/Global_Objects/String/trimEnd
l10n:
sourceCommit: 27180875516cc311342e74b596bfb589b7211e0c
---

{{JSRef}}

**`trimEnd()`** 메서드는 문자열 끝부분의 공백을 제거합니다.
또 해당 메서드는 `trimRight()` 라는 별칭으로 호출이 가능합니다.
{{jsxref("String")}} 값의 **`trimEnd()`** 메서드는 해당 문자열 마지막의 공백을 제거하고 원본 문자열의 수정 없이 새로운 문자열을 반환합니다. `trimRight()`은 이 메서드의 별칭입니다.

{{EmbedInteractiveExample("pages/js/string-trimend.html")}}

## 구문

```js
trimEnd();
```js-nolint
trimEnd()

trimRight();
trimRight()
```

### 반환값
### 매개변수

없음.

### 반환 값

끝 부분(오른쪽)에서 공백이 제거된 `str`을 나타내는 새 문자열입니다. 공백은 [공백](/ko/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) 문자에 [줄 종결자](/ko/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators)를 더한 값으로 정의됩니다.

`str` 에서 (오른쪽)끝 공백이 제거된 새 문자열을 반환합니다.
`str` 에 공백이 없을시에도 에러가 발생하지 않고 여전히 새 문자열(본질적으로 `str` 의 복사본)이 반환됩니다.
`str`의 끝 부분에 공백이 없는 경우도 새 문자열이 반환됩니다(기본적으로 `str`의 복사본입니다).

### 별칭

{{jsxref("String.prototype.padEnd")}} 표준 메서드 이름과 같은 함수의 일관성을 위해서 `trimEnd` 가 되었습니다. 그러나,
웹 호환성을 위해서 `trimEnd` 는 `trimRight` 이라는 별칭을 가집니다. 일부 엔진에서 이것은 다음 예시를 의미합니다.
{{jsxref("String/trim", "trim()")}}가 표준화된 후, 엔진은 비표준 메서드인 `trimRight`도 구현했습니다. 그러나 {{jsxref("String/padEnd", "padEnd()")}}와의 일관성을 위해 이 메서드가 표준화되었을 때 그 이름은 `trimEnd`로 선택되었습니다. 웹 호환성을 위해 `trimRight`는 `trimEnd`의 별칭으로 남아 있으며, 완전히 동일한 함수 객체를 참조합니다. 일부 엔진에서는 이것이 의미하는 바가 있습니다.

```js
String.prototype.trimRight.name === "trimEnd";
```

## 예제

### trimEnd() 사용
### trimEnd() 사용하기

다음 예제는 `' foo'` 문자열을 표시합니다.
다음 예제는 `str`의 끝 부분에 있는 공백을 제거하지만, 시작 부분의 공백은 제거하지 않습니다.

```js
var str = " foo ";
let str = " foo ";

console.log(str.length); // 8

Expand All @@ -58,6 +63,6 @@ console.log(str); // ' foo'

## 같이 보기

- `String.prototype.trimEnd` 의 폴리필은 여기를 [`core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) 참고하세요.
- [`core-js`에서의 `String.prototype.trimEnd` 폴리필](https://github.com/zloirock/core-js#ecmascript-string-and-regexp)
- {{jsxref("String.prototype.trim()")}}
- {{jsxref("String.prototype.trimStart()")}}