feat(common): Add anIntl implementation for the i18n sub-system. #55283
feat(common): Add anIntl implementation for the i18n sub-system. #55283JeanMeche wants to merge 6 commits intoangular:mainfrom
Intl implementation for the i18n sub-system. #55283Conversation
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
e9dd865 to
841fe08
Compare
devversion
left a comment
There was a problem hiding this comment.
Review of currency formatting + plural
There was a problem hiding this comment.
Is there a follow-up to remove this?
There was a problem hiding this comment.
I'll fix the formatting once the PR is merge.
There was a problem hiding this comment.
Is this a breaking change? i.e. there isn't even a way to get back to legacy CLDR here AFAICT
There was a problem hiding this comment.
TGP returned green for this.
Here is the support form Intl.PluralRules.supportedLocalesOf, it is widely within the scope of our supported browser versions.
Depending on how strict we are on our breaking change policy, I can be considered breaking or non-breaking. Happy to know what you (and others) think about this.
There was a problem hiding this comment.
Does Google3 actually use the CLDR plural data? I don't know off hand.
There was a problem hiding this comment.
I changed my mind on this. Let's stay on the safe side and make plural also opt-in.
|
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 |
|
I was sure this PR was merged and released already. So I was rather confused when I tried to use intl implementation, but couldn't find anything about it in current Angular source code. I too would appreciate using this new, lighter, way to do format things. Anything we can do to help move it forward ? |
…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
|
I wonder: any hope for v21 or no way? |
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
IntlAPI.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:
Intlbrowser APIs for internationalization #49143zh-Hant-TWorzh-TWlocale in@angular/common#54114Closes #54470