angular-best-practices-transloco

star 35

Transloco i18n best practices for Angular. Covers runtime translation, lazy-loaded translation files per route, and test mocking. Activates when working with @jsverse/transloco. Do not use for ngx-translate or i18next. Install alongside angular-best-practices for full coverage.

alfredoperez By alfredoperez schedule Updated 3/1/2026

name: angular-best-practices-transloco description: >- Transloco i18n best practices for Angular. Covers runtime translation, lazy-loaded translation files per route, and test mocking. Activates when working with @jsverse/transloco. Do not use for ngx-translate or i18next. Install alongside angular-best-practices for full coverage. license: MIT metadata: author: alfredoperez version: "1.2.0" tags: [angular, transloco, i18n, internationalization] globs: - "/*.ts" - "/.html" - "**/.json"

Angular Transloco Best Practices

Transloco rules for runtime internationalization, lazy-loaded translations, and testing. Use with the core angular-best-practices skill for comprehensive Angular coverage.

Links

When to Apply

  • Adding runtime i18n with the transloco pipe or directive
  • Lazy-loading translation files per route with scopes
  • Writing tests that use TranslocoTestingModule

Rules

Rule Impact Description
Lazy Load Translation Files per Route MEDIUM Load scoped translations only when a route is activated
Mock Translations in Tests MEDIUM Fast deterministic tests without HTTP translation loading
Use Transloco for Runtime i18n MEDIUM Dynamic language switching without app rebuilds

Install

Install from skills.sh/alfredoperez/angular-best-practices:

Install via CLI
npx skills add https://github.com/alfredoperez/angular-best-practices --skill angular-best-practices-transloco
Repository Details
star Stars 35
call_split Forks 2
navigation Branch main
article Path SKILL.md
More from Creator
alfredoperez
alfredoperez Explore all skills →