-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
c: localeComponent: locale identifiersComponent: locale identifierss: in progressStatus: the issue has an active proposalStatus: the issue has an active proposal
Description
This is the second spin-off from #68.
Proposing a new class Intl.Locale which creates objects with a list of extension keys used by any of the formatters and with toString method which produces a BCP47 locale string with relevant extension keys.
Examples:
let locale = new Intl.Locale('en-US');
locale.toString(); // 'en-US'
locale.calendar; // undefinedlet locale = new Intl.Locale('en-US', {
ca: 'buddhist'
});
locale.toString(); // 'en-US-u-ca-buddhist'
locale.calendar; // 'buddhist'let locale = new Intl.Locale('en-US-u-ca-buddhist');
locale.toString(); // 'en-US-u-ca-buddhist'
locale.calendar; // 'buddhist'let locale = new Intl.Locale('en-US-u-ca-buddhist', {
ca: 'gregory'
});
locale.toString(); // 'en-US-u-ca-gregory'
locale.calendar; // 'gregory'let locale = new Intl.Locale('en-US-u-ca-buddhist', {
ca: 'gregory'
});
locale.toString(); // 'en-US-u-ca-gregory'
locale.calendar; // 'gregory'Proposed list of supported extension keys and their option key names:
ca--calendarnu--numberingSystemhc--hourCycletz--timeZonecu--currencyco--collationkn--numerickf--caseFirst
Looking for feedback
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: localeComponent: locale identifiersComponent: locale identifierss: in progressStatus: the issue has an active proposalStatus: the issue has an active proposal