| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Intl | [Back] [Original] |
Get to know MDN better
() locales options options.localeMatcher
locales JavaScript locales locales
undefined Intl.Locale 2 TypeError RangeError new Intl.DateTimeFormat("default") "default"
"hi": "de-AT": "zh-Hans-CN": "en-emodeng": "Early modern English" BCP 47 ("x" ) 1 2 8 1 "de-a-foo-a-foo" BCP 47 Unicode CLDR Project 2
"u" (Unicode) Intl API
"de-DE-u-co-phonebk": ae, oe, ue "th-TH-u-nu-thai": (, , , , , , , , , ) "ja-JP-u-ca-japanese": 2013 25 "en-GB-u-ca-islamic-umalqura": (Hijri) 2017 10 14 Hijri 24 Muharram, 1439 "t" (transformed) Intl "t" "de-t-en" "en-emodeng-emodeng" emodeng "de-t-en-emodeng-emodeng"
"x" 1 8 1 Intl
options options
localeMatcher "lookup" "best fit"
locales Unicode "lookup" BCP 47 Lookup "best fit" Lookup locales options
Unicode Unicode "co" Intl.Collator "phonebk"
Intl.Collatorcollator
Intl.DateTimeFormatIntl.DisplayNamesIntl.DurationFormatIntl.ListFormatIntl.LocaleUnicode
Intl.NumberFormatIntl.PluralRulesIntl.RelativeTimeFormatIntl.SegmenterIntl[Symbol.toStringTag]Intl
const count = 26254.39;
const date = new Date("2012-05-24");
function log(locale) {
console.log(
`${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(
locale,
).format(count)}`,
);
}
log("en-US"); // 5/24/2012 26,254.39
log("de-DE"); // 24.5.2012 26.254,39
Intl navigator.language
const date = new Date("2012-05-24");
const formattedDate = new Intl.DateTimeFormat(navigator.language).format(date);
navigator.languages Intl
const count = 26254.39;
const formattedCount = new Intl.NumberFormat(navigator.languages).format(count);
| ECMAScript 2027 Internationalization API Specification # intl-object |
Keyboard.getLayoutMap()navigator.languagenavigator.languages| Web Proxy Viewer | New URL | Original Page |