docs.packages.schematics
@ngx-runtime-i18n/schematics
An ng add schematic that wires provideRuntimeI18n() and sample catalogs into an existing Angular workspace.
Install
ng add @ngx-runtime-i18n/schematics --default-lang=en --additional-langs=hi,deWhat ng add does
Running the schematic against an Angular project:
- Adds
@ngx-runtime-i18n/angularand@ngx-runtime-i18n/coretodependenciesinpackage.json. - Scaffolds sample catalog files at
public/i18n/<lang>.jsonfor the default language and any additional languages requested. - Patches
app.config.ts— checking common Angular and Nx project locations — to import and registerprovideRuntimeI18n(), unless it detects the provider is already configured. - Schedules an
npm installso the new dependencies install immediately.
Options
| Option | Type | Default | Description |
|---|---|---|---|
project |
string |
— | The Angular project to configure. Required. |
defaultLang |
string |
en |
The default language tag (BCP-47). |
additionalLangs |
string[] |
[] |
Additional language tags to scaffold catalogs for. |
ssr |
boolean |
false |
Reserved for SSR provider setup. |
Run the schematic once against a fresh project to see the exact diff it produces, then compare against Getting started if you'd rather wire provideRuntimeI18n() by hand.