LogoLogo
โค๏ธ SponserMore
  • ๐Ÿš€Getting Started
    • Installation
    • Angular Compatibility
    • Config Options
  • ๐Ÿ’กCore Concepts
    • Translation in the Template
    • Signals
    • Translation API
    • Language API
  • ๐Ÿง Advanced Topics
    • ๐ŸฆฅLazy Load
      • Scope Configuration
      • Inline Loaders
    • The Transpiler
    • SSR Support
    • Unit Testing
    • Hack the Library
  • ๐ŸงชSandbox & Examples
  • โš™๏ธAdditional Functionality
    • Loading Template
    • Key Referencing
    • Utility Functions
    • Comments for Translators
    • Multiple Languages Simultaneously
  • ๐Ÿ“ฆMigration Guides
    • Migrate from ngx-translate
    • Migrate from Angular's i18n
  • ๐Ÿ”งTools
    • Keys Manager (TKM)
      • Keys Extractor
      • Keys Detective
      • Options
      • Debugging
      • Using with Nx ๐Ÿ‹
    • Validator
    • Optimize
    • Scoped Library Extractor
  • ๐Ÿ”ŒPlugins
    • Message Format
    • Persist Translations
    • Persist Lang
    • Preload Langs
    • Locale l10n
    • Community Plugins
  • ๐ŸงฐSchematics
    • :ng-add
    • :scope
    • :join
    • :split
  • ๐ŸณRecipies
    • Prefetch User Language
    • Using Xliff
    • Generate Locale Files using Google Translate
  • ๐Ÿ“šBlog Posts
    • Transloco Team Posts
      • Transloco Goes Functional: A Guide to Transloco's Functional Transpiler
    • From the Community
  • โ“FAQs
Powered by GitBook

@ 2025 Transloco

On this page
  • Command
  • Options
  • Usage Example

Was this helpful?

  1. Schematics

: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]
pnpm add @jsverse/transloco
nx g @jsverse/transloco:ng-add

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
Previous:ng-addNext:join

Last updated 5 months ago

Was this helpful?

๐Ÿงฐ