-
Notifications
You must be signed in to change notification settings - Fork 26.2k
feat(common): Add anIntl
implementation for the i18n sub-system.
#55283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
6c939c3
to
0ceb875
Compare
0ceb875
to
7c177e2
Compare
Intl
implementation for the i18n sub-system.
f270b14
to
d5c6da5
Compare
767753e
to
1ca64d6
Compare
1ca64d6
to
ac18c25
Compare
722eb2d
to
8a8c659
Compare
39678f2
to
015b124
Compare
2547e3e
to
2e46efe
Compare
…nd currencies This commit adds an `Intl` implementation to format numbers, percents and currencies. The implementation is based on the `Intl` API and allows to drop the static imports for the locale date files. fixes angular#33803
With this commit, plurals formatting does not depend on the CLDR locale data anymore.
With this commit, the Intl implementation because the default one and doesn't require the CLDR locale data imports anymore. Opt-out is possible by invoking `useLegacyDateFormatting()` ahead of bootstrap. BREAKING CHANGE: Some custom date format aren't supported any more (`cccccc`, `EEEEEE`, `aaaaa`, `b` to `bbbbb` and `B` to `BBBBB`) The `DatePipe` will not support offset timezone anymore, use IANA timezones instead .
…cents and currencies
2e46efe
to
8b33b29
Compare
I hope I'm not being a nuisance, but what is the status for this PR? I see it was removed from v20 milestone recently, and the last thing mentioned was in #57916:
I've been considering replacing |
Angular's i18n subsystem is responsible for providing localised formatting of numbers, percents, percentages and dates.
This feature replaces the default implementation of the i18N subsystem.
The commits add a new implementation that relies on the platform-provided
Intl
API.With this new implementation relying on a platform API, it is not necessary anymore the load locale files (See #20487) .
The new implementation is available via an opt-in :
useIntlImplementation()
.This feature fixes the following issues:
Intl
browser APIs for internationalization #49143zh-Hant-TW
orzh-TW
locale in@angular/common
#54114Closes #54470