# jsverse/transloco architecture

> Architecture diagram of the GitHub repository jsverse/transloco, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jsverse/transloco
- Repository: https://github.com/jsverse/transloco

## Overview

Transloco is an Angular internationalization library: an application selects a language, loads translations, and renders translated content, with optional localization and persistence plugins. The graph also preserves the README’s documented developer-tooling and runtime capabilities. Core runtime links are supported by the service excerpt and SOURCE INDEX; several plugin and schematics internals are unsampled, so their relationships are omitted rather than inferred.

Main entry points: [`libs/transloco/src/lib/transloco.service.ts`](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.service.ts) (Translation service), [`libs/transloco-locale/src/lib/transloco-locale.service.ts`](https://github.com/jsverse/transloco/blob/master/libs/transloco-locale/src/lib/transloco-locale.service.ts) (Locale service), [`libs/transloco-keys-manager/src/lib/keys-builder`](https://github.com/jsverse/transloco/tree/master/libs/transloco-keys-manager/src/lib/keys-builder) (Translation key manager), [`libs/transloco-keys-manager/src/lib/keys-builder/typescript/scan-source-file.ts`](https://github.com/jsverse/transloco/blob/master/libs/transloco-keys-manager/src/lib/keys-builder/typescript/scan-source-file.ts) (TypeScript source scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Translation runtime"]
  node_translation_service["Translation service"]
  node_translation_loader["Translation loader"]
  node_transpiler["Translation transpiler"]
  node_rendering_api["Template and signal API"]
  node_fallbacks["Fallback strategy"]
  node_missing_handler["Missing-key handler"]
  node_config["Runtime configuration"]
end

subgraph group_plugins["Runtime extensions"]
  node_locale_service["Locale service"]
  node_locale_pipes["Locale pipes"]
  node_messageformat["MessageFormat plugin"]
  node_optimize["Optimization plugin"]
  node_persist_lang["Language persistence"]
  node_persist_translations["Translation persistence"]
  node_preload["Language preloading"]
end

subgraph group_tooling["Developer tools"]
  node_keys_manager["Translation key manager"]
  node_source_scan["TypeScript source scan"]
  node_service_extractor["Service key extractor"]
  node_schematics["Angular schematics"]
end

subgraph group_examples["Playground"]
  node_playground["Feature examples<br/>[app.routes.ts]"]
  node_locale_example["Locale examples"]
end

node_angular_app(("Angular application"))

node_angular_app -->|"uses API"| node_translation_service
node_translation_service -->|"loads translations"| node_translation_loader
node_translation_service -->|"transpiles values"| node_transpiler
node_translation_service -->|"resolves fallback"| node_fallbacks
node_translation_service -->|"handles missing keys"| node_missing_handler
node_translation_service -->|"reads configuration"| node_config
node_translation_service -.->|"serves translations"| node_rendering_api
node_locale_service -->|"tracks language"| node_translation_service
node_locale_service -.->|"formats values"| node_locale_pipes
node_translation_service -.->|"supports transpiler"| node_messageformat
node_angular_app -.->|"may enable plugin"| node_optimize
node_angular_app -.->|"may persist language"| node_persist_lang
node_angular_app -.->|"may persist translations"| node_persist_translations
node_angular_app -.->|"may preload languages"| node_preload
node_angular_app -.->|"manages translation keys"| node_keys_manager
node_keys_manager -.->|"scans source"| node_source_scan
node_source_scan -->|"provides scan results"| node_service_extractor
node_angular_app -.->|"configures integration"| node_schematics
node_angular_app -->|"explores examples"| node_playground
node_playground -.->|"includes locale demo"| node_locale_example

click node_translation_service "https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.service.ts"
click node_translation_loader "https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.loader.ts"
click node_transpiler "https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.transpiler.ts"
click node_rendering_api "https://github.com/jsverse/transloco/tree/master/libs/transloco/src/lib"
click node_fallbacks "https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco-fallback-strategy.ts"
click node_missing_handler "https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco-missing-handler.ts"
click node_config "https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.config.ts"
click node_locale_service "https://github.com/jsverse/transloco/blob/master/libs/transloco-locale/src/lib/transloco-locale.service.ts"
click node_locale_pipes "https://github.com/jsverse/transloco/tree/master/libs/transloco-locale/src/lib/pipes"
click node_messageformat "https://github.com/jsverse/transloco/blob/master/libs/transloco-messageformat/src/lib/messageformat.transpiler.ts"
click node_optimize "https://github.com/jsverse/transloco/blob/master/libs/transloco-optimize/src/lib/transloco-optimize.ts"
click node_persist_lang "https://github.com/jsverse/transloco/blob/master/libs/transloco-persist-lang/src/lib/persist-lang.service.ts"
click node_persist_translations "https://github.com/jsverse/transloco/blob/master/libs/transloco-persist-translations/src/lib/transloco-persist-translations.service.ts"
click node_preload "https://github.com/jsverse/transloco/blob/master/libs/transloco-preload-langs/src/lib/preload-langs.service.ts"
click node_keys_manager "https://github.com/jsverse/transloco/tree/master/libs/transloco-keys-manager/src/lib/keys-builder"
click node_source_scan "https://github.com/jsverse/transloco/blob/master/libs/transloco-keys-manager/src/lib/keys-builder/typescript/scan-source-file.ts"
click node_service_extractor "https://github.com/jsverse/transloco/blob/master/libs/transloco-keys-manager/src/lib/keys-builder/typescript/service.extractor.ts"
click node_schematics "https://github.com/jsverse/transloco/tree/master/libs/transloco-schematics/src"
click node_playground "https://github.com/jsverse/transloco/blob/master/apps/transloco-playground/src/app/app.routes.ts"
click node_locale_example "https://github.com/jsverse/transloco/tree/master/apps/transloco-playground/src/app/multi-langs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_translation_service,node_translation_loader,node_transpiler,node_rendering_api,node_fallbacks,node_missing_handler,node_config toneBlue
class node_locale_service,node_locale_pipes,node_messageformat,node_optimize,node_persist_lang,node_persist_translations,node_preload toneAmber
class node_keys_manager,node_source_scan,node_service_extractor,node_schematics toneMint
class node_playground,node_locale_example toneRose
class node_angular_app toneIndigo
```

## Components

### Translation runtime

- [Translation service](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.service.ts): `libs/transloco/src/lib/transloco.service.ts`
- [Translation loader](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.loader.ts): `libs/transloco/src/lib/transloco.loader.ts`
- [Translation transpiler](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.transpiler.ts): `libs/transloco/src/lib/transloco.transpiler.ts`
- [Template and signal API](https://github.com/jsverse/transloco/tree/master/libs/transloco/src/lib): `libs/transloco/src/lib`
- [Fallback strategy](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco-fallback-strategy.ts): `libs/transloco/src/lib/transloco-fallback-strategy.ts`
- [Missing-key handler](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco-missing-handler.ts): `libs/transloco/src/lib/transloco-missing-handler.ts`
- [Runtime configuration](https://github.com/jsverse/transloco/blob/master/libs/transloco/src/lib/transloco.config.ts): `libs/transloco/src/lib/transloco.config.ts`

### Runtime extensions

- [Locale service](https://github.com/jsverse/transloco/blob/master/libs/transloco-locale/src/lib/transloco-locale.service.ts): `libs/transloco-locale/src/lib/transloco-locale.service.ts`
- [Locale pipes](https://github.com/jsverse/transloco/tree/master/libs/transloco-locale/src/lib/pipes): `libs/transloco-locale/src/lib/pipes`
- [MessageFormat plugin](https://github.com/jsverse/transloco/blob/master/libs/transloco-messageformat/src/lib/messageformat.transpiler.ts): `libs/transloco-messageformat/src/lib/messageformat.transpiler.ts`
- [Optimization plugin](https://github.com/jsverse/transloco/blob/master/libs/transloco-optimize/src/lib/transloco-optimize.ts): `libs/transloco-optimize/src/lib/transloco-optimize.ts`
- [Language persistence](https://github.com/jsverse/transloco/blob/master/libs/transloco-persist-lang/src/lib/persist-lang.service.ts): `libs/transloco-persist-lang/src/lib/persist-lang.service.ts`
- [Translation persistence](https://github.com/jsverse/transloco/blob/master/libs/transloco-persist-translations/src/lib/transloco-persist-translations.service.ts): `libs/transloco-persist-translations/src/lib/transloco-persist-translations.service.ts`
- [Language preloading](https://github.com/jsverse/transloco/blob/master/libs/transloco-preload-langs/src/lib/preload-langs.service.ts): `libs/transloco-preload-langs/src/lib/preload-langs.service.ts`

### Developer tools

- [Translation key manager](https://github.com/jsverse/transloco/tree/master/libs/transloco-keys-manager/src/lib/keys-builder): `libs/transloco-keys-manager/src/lib/keys-builder`
- [TypeScript source scan](https://github.com/jsverse/transloco/blob/master/libs/transloco-keys-manager/src/lib/keys-builder/typescript/scan-source-file.ts): `libs/transloco-keys-manager/src/lib/keys-builder/typescript/scan-source-file.ts`
- [Service key extractor](https://github.com/jsverse/transloco/blob/master/libs/transloco-keys-manager/src/lib/keys-builder/typescript/service.extractor.ts): `libs/transloco-keys-manager/src/lib/keys-builder/typescript/service.extractor.ts`
- [Angular schematics](https://github.com/jsverse/transloco/tree/master/libs/transloco-schematics/src): `libs/transloco-schematics/src`

### Playground

- [Feature examples](https://github.com/jsverse/transloco/blob/master/apps/transloco-playground/src/app/app.routes.ts): `apps/transloco-playground/src/app/app.routes.ts`
- [Locale examples](https://github.com/jsverse/transloco/tree/master/apps/transloco-playground/src/app/multi-langs): `apps/transloco-playground/src/app/multi-langs`

### Other components

- **Angular application**

## Connections

- Angular application → Translation service: uses API
- Translation service → Translation loader: loads translations (evidence: `libs/transloco/src/lib/transloco.service.ts`)
- Translation service → Translation transpiler: transpiles values (evidence: `libs/transloco/src/lib/transloco.service.ts`)
- Translation service → Fallback strategy: resolves fallback (evidence: `libs/transloco/src/lib/transloco.service.ts`)
- Translation service → Missing-key handler: handles missing keys (evidence: `libs/transloco/src/lib/transloco.service.ts`)
- Translation service → Runtime configuration: reads configuration (evidence: `libs/transloco/src/lib/transloco.service.ts`)
- Translation service → Template and signal API: serves translations (evidence: `libs/transloco/src/lib/transloco.service.ts`)
- Locale service → Translation service: tracks language (evidence: `libs/transloco-locale/src/lib/transloco-locale.service.ts`)
- Locale service → Locale pipes: formats values
- Translation service → MessageFormat plugin: supports transpiler
- Angular application → Optimization plugin: may enable plugin
- Angular application → Language persistence: may persist language
- Angular application → Translation persistence: may persist translations
- Angular application → Language preloading: may preload languages
- Angular application → Translation key manager: manages translation keys
- Translation key manager → TypeScript source scan: scans source (evidence: `libs/transloco-keys-manager/src/lib/keys-builder/typescript/service.extractor.ts`)
- TypeScript source scan → Service key extractor: provides scan results (evidence: `libs/transloco-keys-manager/src/lib/keys-builder/typescript/service.extractor.ts`)
- Angular application → Angular schematics: configures integration
- Angular application → Feature examples: explores examples (evidence: `apps/transloco-playground/src/app/app.routes.ts`)
- Feature examples → Locale examples: includes locale demo (evidence: `apps/transloco-playground/src/app/app.routes.ts`)
