Intl.DisplayNames.supportedLocalesOf()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2021ë 4ì.
Intl.DisplayNames.supportedLocalesOf() ì ì ë©ìëë ë°íìì 기본 ë¡ì¼ì¼ë¡ ëëìê°ì§ ìê³ íì ì´ë¦ìì ì§ìëë ì ê³µë ë¡ì¼ì¼ì í¬í¨íë ë°°ì´ì ë°íí©ëë¤.
구문
Intl.DisplayNames.supportedLocalesOf(locales)
Intl.DisplayNames.supportedLocalesOf(locales, options)
매ê°ë³ì
locales-
BCP 47 ì¸ì´ íê·¸ê° í¬í¨ë 문ìì´ ëë ì´ë¬í ë¡ì¼ì¼ ìë³ìì ë°°ì´ì ëë¤.
localesì¸ìì ì¼ë°ì ì¸ íìê³¼ í´ìì ëí´ìëIntlë©ì¸ íì´ì§ì 매ê°ë³ì ì¤ëª ì 참조íì¸ì. optionsOptional-
ë¤ìì ìì±ì ê°ì§ ì ìë ê°ì²´
localeMatcher-
ì¬ì©í ë¡ì¼ì¼ ì¼ì¹ ìê³ ë¦¬ì¦ì ëë¤. ê°ë¥í ê°ì
"lookup"ë°"best fit"ì´ë©°, 기본ê°ì"best fit"ì ëë¤. ì´ ìµì ì ëí´ ë ìê³ ì¶ì¼ìë¤ë©´ Intl íì´ì§ë¥¼ ì°¸ê³ íì기 ë°ëëë¤.
ë°í ê°
ë°íìì 기본 ë¡ì¼ì¼ë¡ ëëìê°ì§ ìê³ íì ì´ë¦ë¡ ì§ìëë ì§ì ë ë¡ì¼ì¼ íê·¸ì íì ì§í©ì ëíë´ë 문ìì´ ë°°ì´ì ëë¤.
ìì
>supportedLocalesOf() ì¬ì©í기
ì¸ëë¤ììì´ì ë
ì¼ì´ë ì§ìíì§ë§ ë°ë¦¬ì´ë íì ì´ë¦ì ì§ìíì§ ìë ë°íìì ê°ì í´ë³´ê² ìµëë¤. supportedLocalesOfë ì¸ëë¤ììì´ì ë
ì¼ì´ ì¸ì´ í그를 ë³ê²½ ìì´ ë°ííì§ë§ pinyin ì½ë ì´ì
ì íì ì´ë¦ê³¼ ê´ë ¨ì´ ìê±°ë ì¸ëë¤ììì´ì í¨ê» ì¬ì©ëì§ ìì¼ë©° ì¸ëë¤ììì í¹íë ë
ì¼ì´ë ì§ìëì§ ìì ê°ë¥ì±ì´ ëìµëë¤. ì¬ê¸°ì "lookup" ìê³ ë¦¬ì¦ì ëª
ì¸ì ì ìíì¸ì. ëë¶ë¶ì ë°ë¦¬ì´ ì¬ì©ìë ì¸ëë¤ììì´ë¥¼ ì´í´íë¯ë¡ "best fit" ì¼ì¹ê¸°ë ë°ë¦¬ì´ê° ì¸ëë¤ììì´ì ì ì í ì¼ì¹íë¤ê³ íë¨íì¬ ë°ë¦¬ì´ íê·¸ë ë°íí ì ììµëë¤.
const locales = ["ban", "id-u-co-pinyin", "de-ID"];
const options = { localeMatcher: "lookup" };
console.log(Intl.DisplayNames.supportedLocalesOf(locales, options));
// ["id-u-co-pinyin", "de-ID"]
ëª ì¸ì
| Specification |
|---|
| ECMAScript® 2027 Internationalization API Specification> # sec-Intl.DisplayNames.supportedLocalesOf> |