| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale | [Back] [Original] |
Get to know MDN better
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.caseFirstIntl.Locale.prototype.collation Locale
Intl.Locale.prototype.hourCycleIntl.Locale.prototype.languageIntl.Locale.prototype.numberingSystemIntl.Locale.prototype.numericIntl.Locale.prototype.region()
Intl.Locale.prototype.scriptIntl.Locale.prototype.variantsIntl.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()Intl.Locale.prototype.maximize()Intl.Locale.prototype.minimize()Intl.Locale.prototype.toString()let us = new Intl.Locale("en-US");
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 |