:scope

This schematic adds a new Transloco scope to an existing or new Angular module and creates the scope's translation files.


Command

ng generate @jsverse/transloco:scope [name]

Options

Option

Alias

Description

Type

Default

--name

-

Defines the name of the new scope.

string

-

--module

-

Defines the path to the module where the scope should be added. If not provided, a new module is created.

string

-

--langs

la

Defines the languages for the scope. Defaults to the root languages.

string

Root languages of the project

--skip-creation

-

Skips the creation of translation files.

boolean

false

--translate-type

-

Defines the format of the translation files.

string

JSON

--translation-path

-

Defines the location of the translation files.

string

assets/i18n/

Usage Example

ng g @jsverse/transloco:scope my-scope
ng g @jsverse/transloco:scope my-scope --module path/to/my-scope
ng g @jsverse/transloco:scope my-scope --langs en,fr --skip-creation

Last updated

Was this helpful?