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

Function withI18nSupport

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

Source from the content-addressed store, hash-verified

314 * @see [I18N](guide/hydration#i18n)
315 */
316export function withI18nSupport(): Provider[] {
317 return [
318 {
319 provide: IS_I18N_HYDRATION_ENABLED,
320 useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED),
321 },
322 {
323 provide: ENVIRONMENT_INITIALIZER,
324 useValue: () => {
325 if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
326 enableI18nHydrationRuntimeSupport();
327 setIsI18nHydrationSupportEnabled(true);
328 performanceMarkFeature('NgI18nHydration');
329 }
330 },
331 multi: true,
332 },
333 ];
334}
335
336/**
337 * 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