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

Intl.Locale - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

Intl.Locale

Baseline *

20209

*

Intl.Locale Unicode Intl

const korean = new Intl.Locale("ko", {
  script: "Kore",
  region: "KR",
  hourCycle: "h23",
  calendar: "gregory",
});

const japanese = new Intl.Locale("ja-Jpan-JP-u-ca-japanese-hc-h12");

console.log(korean.baseName, japanese.baseName);
// Expected output: "ko-Kore-KR" "ja-Jpan-JP"

console.log(korean.hourCycle, japanese.hourCycle);
// Expected output: "h23" "h12"

Intl.Locale Unicode Unicode

Intl API Unicode Locale Intl.Locale Unicode

language ID
script ID language
region ID script
variants ID region
calendar ca
caseFirst kf
collation co
hourCycle hc
numberingSystem nu
numeric kn

Locale Intl.Locale

Intl.Locale()

Locale

Intl.Locale.prototype.baseName

Locale

Intl.Locale.prototype.calendar

Locale

Intl.Locale.prototype.caseFirst

Intl.Locale.prototype.collation

Locale

Intl.Locale.prototype.hourCycle

Intl.Locale.prototype.language

Intl.Locale.prototype.numberingSystem

Intl.Locale.prototype.numeric

Intl.Locale.prototype.region

()

Intl.Locale.prototype.script

Intl.Locale.prototype.variants

Intl.Locale.prototype[Symbol.toStringTag]

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

Intl.Locale.prototype.getCalendars()

(Array)

Intl.Locale.prototype.getCollations()

Locale (Array)

Intl.Locale.prototype.getHourCycles()

(Array) 12 ("h12") 12 ("h11")24 ("h23") "h24"

Intl.Locale.prototype.getNumberingSystems()

(Array)

Intl.Locale.prototype.getTextInfo()

ltr rtl

Intl.Locale.prototype.getTimeZones()

Locale (Array)

Intl.Locale.prototype.getWeekInfo()

UTS 35

Intl.Locale.prototype.maximize()

Intl.Locale.prototype.minimize()

Locale.maximize()

Intl.Locale.prototype.toString()

Intl.Locale

js
let us = new Intl.Locale("en-US");

Locale options

hourCycle

js
let us12hour = new Intl.Locale("en-US", { hourCycle: "h12" });
console.log(us12hour.hourCycle); // Prints "h12"

ECMAScript 2027 Internationalization API Specification
# locale-objects


Web Proxy Viewer  |  New URL  |  Original Page