Intl.DisplayNames
Browser support
Full support
Browser support
Full support
Available in Chrome from version 81 Chrome
Available in Edge from version 81 Edge
Available in Firefox from version 86 Firefox
Available in Opera from version 68 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 81 Chrome Android
Available in Firefox for Android from version 86 Firefox for Android
Available in Opera Android from version 58 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 13.0 Samsung Internet
Available in WebView Android from version 81 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 14.0.0 Node.js
Input
zh-CN
Output
region
{
style: "long",
type: "region"
}
美国
{
style: "short",
type: "region"
}
美国
{
style: "narrow",
type: "region"
}
美国
language
{
languageDisplay: "dialect",
type: "language"
}
美国英语
{
languageDisplay: "standard",
type: "language"
}
英语(美国)
currency
{
type: "currency"
}
美元
script
{
type: "script"
}
拉丁文
calendar
{
type: "calendar"
}
公历
dateTimeField
{
style: "short",
type: "dateTimeField"
}
月
{
style: "long",
type: "dateTimeField"
}
月
{
style: "narrow",
type: "dateTimeField"
}
月