MCPcopy Create free account
hub / github.com/angular/angular / withI18nSupport

Function withI18nSupport

packages/core/src/hydration/api.ts:314–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 * @see [I18N](guide/hydration#i18n)
313 */
314export function withI18nSupport(): Provider[] {
315 return [
316 {
317 provide: IS_I18N_HYDRATION_ENABLED,
318 useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED),
319 },
320 {
321 provide: ENVIRONMENT_INITIALIZER,
322 useValue: () => {
323 if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
324 enableI18nHydrationRuntimeSupport();
325 setIsI18nHydrationSupportEnabled(true);
326 performanceMarkFeature('NgI18nHydration');
327 }
328 },
329 multi: true,
330 },
331 ];
332}
333
334/**
335 * Returns a set of providers required to setup support for incremental hydration.

Callers

nothing calls this directly

Calls 4

injectFunction · 0.90
performanceMarkFeatureFunction · 0.90

Tested by

no test coverage detected