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

Was this helpful?

  1. Tools
  2. Keys Manager (TKM)

Using with Nx ๐Ÿ‹

To use TKM in an Nx workspace, we are going to leverage the --project flag to dynamically set the base paths for rootTranslationsPath, input, and output, ensuring the correct translation files are handled for the specified project.

Make sure you don't have these properties set on your transloco.config.ts

Defining an Nx Workspace Task

To integrate Transloco commands with an Nx workspace, you can define tasks in the project.json file of each application or library where you want Transloco to extract or find keys. Below is an example setup:

{
  "i18n-extract": {
    "command": "transloco-keys-manager extract --project projectName"
  },
  "i18n-find": {
    "command": "transloco-keys-manager find --project projectName"
  }
}
  • i18n-extract: Extracts translation keys from the specified project.

  • i18n-find: Identifies missing keys or extra keys in the specified project.

Replace projectName with the project's name as defined in your angular.json or Nx workspace configuration.

Don't pass the cwd option to these nx commands as it will affect the root path to look for the "prettier" config file used by the keys manager.

PreviousDebuggingNextValidator

Last updated 5 months ago

Was this helpful?

๐Ÿ”ง