[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Intl [Back]  [Original]

Intl - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

Intl

Baseline *

20179

*

Intl ECMAScript API

Intl new Intl Intl Math

() locales options options.localeMatcher

locales

locales JavaScript locales locales

2 TypeError RangeError new Intl.DateTimeFormat("default") "default"

  1. 23 58
  2. 4
  3. 2 3
  4. 1 58 3
  5. 1 BCP 47

ASCII

  • "hi":
  • "de-AT":
  • "zh-Hans-CN":
  • "en-emodeng": "Early modern English"

IANA

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 options

localeMatcher "lookup" "best fit"

locales Unicode "lookup" BCP 47 Lookup "best fit" Lookup locales options

Unicode Unicode "co" Intl.Collator "phonebk"

Intl.Collator

collator

Intl.DateTimeFormat

Intl.DisplayNames

Intl.DurationFormat

Intl.ListFormat

Intl.Locale

Unicode

Intl.NumberFormat

Intl.PluralRules

Intl.RelativeTimeFormat

Intl.Segmenter

Intl[Symbol.toStringTag]

[Symbol.toStringTag] "Intl" Object.prototype.toString()

Intl.getCanonicalLocales()

Intl.supportedValuesOf()

Intl

js
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

js
const date = new Date("2012-05-24");

const formattedDate = new Intl.DateTimeFormat(navigator.language).format(date);

navigator.languages Intl

js
const count = 26254.39;

const formattedCount = new Intl.NumberFormat(navigator.languages).format(count);

ECMAScript 2027 Internationalization API Specification
# intl-object


Web Proxy Viewer  |  New URL  |  Original Page