mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Plural ICU expressions depend on the locale (different languages have different plural forms). Until now the locale was hard coded as `en-US`. For compatibility reasons, if you use ivy with AOT and bootstrap your app with `bootstrapModule` then the `LOCALE_ID` token will be set automatically for ivy, which is then used to get the correct plural form. If you use JIT, you need to define the `LOCALE_ID` provider on the module that you bootstrap. For `TestBed` you can use either `configureTestingModule` or `overrideProvider` to define that provider. If you don't use the compat mode and start your app with `renderComponent` you need to call `ɵsetLocaleId` manually to define the `LOCALE_ID` before bootstrap. We expect this to change once we start adding the new i18n APIs, so don't rely on this function (there's a reason why it's a private export). PR Close #29249 |
||
|---|---|---|
| .. | ||
| async.ts | ||
| async_fallback.ts | ||
| async_test_completer.ts | ||
| before_each.ts | ||
| component_fixture.ts | ||
| fake_async.ts | ||
| fake_async_fallback.ts | ||
| lang_utils.ts | ||
| logger.ts | ||
| metadata_override.ts | ||
| metadata_overrider.ts | ||
| ng_zone_mock.ts | ||
| private_export_testing.ts | ||
| r3_test_bed.ts | ||
| r3_test_bed_compiler.ts | ||
| resolvers.ts | ||
| test_bed.ts | ||
| test_bed_common.ts | ||
| test_compiler.ts | ||
| testing.ts | ||
| testing_internal.ts | ||