Typed localization contracts

Generators & Analyzers

Move localization mistakes from runtime into the build.

Explore source
Parent systemProTranslate
StatusActive
Modules3
RepositoryProTranslate/ProTranslate.SourceGenerator

An incremental generator creates strongly typed keys and provider manifests while Roslyn analyzers catch missing keys, placeholder mismatches, and catalog gaps.

  1. 01

    Strongly typed keys

  2. 02

    Incremental generation

  3. 03

    Placeholder diagnostics

  4. 04

    IStringLocalizer and DI integration

From intent
to working system.

01

Scan

The build discovers catalogs and declared translation keys.

02

Generate

Typed APIs and provider metadata join the compilation.

03

Analyze

Roslyn diagnostics compare usage, placeholders, and coverage.

04

Integrate

DI and IStringLocalizer adapters expose generated services to applications.

Adopt this
capability.

Start with the primary module, then add the related packages only when the application needs those layers. Replace VERSION with the current NuGet version.

01 · Install
Terminal
dotnet add package ProTranslate.SourceGenerator
dotnet add package ProTranslate.Analyzers
02 · Use · csharp
QuickStart.cs
var title = Translations.Shell.Title;
var greeting = Translations.Account.Greeting(user.DisplayName);

Use one layer.
Compose the rest.

Read the module beside the complete system.

The implementation, samples, issues, and release notes stay in the parent repository so module details remain connected to the product architecture.

ProTranslate

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…