AGENT SKILL

angular-best-practices-transloco

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
最近更新
2026-10-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
angular-best-practices-transloco
tags
[ "angular", "transloco", "i18n", "internationalization" ]
globs
[ "**/*.ts", "**/*.html", "**/*.json" ]
license
MIT
metadata
{ "author": "alfredoperez", "version": "1.2.0" }
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.

02 资源文件 1

03 SKILL.md 正文

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:

04 同仓库更多 Skills