explaingit

wieslawsoltes/protranslate

Analysis updated 2026-06-24

13C#Audience · developerComplexity · 4/5Setup · moderate

TLDR

Cross-framework localization and globalization library for .NET XAML apps, with one shared core and adapters for Avalonia, WPF, MAUI, WinUI, and Uno.

Mindmap

mindmap
  root((ProTranslate))
    Inputs
      Resource files
      Translation catalogs
      Culture settings
    Outputs
      Localized labels
      Region formats
      Generated key constants
    Use Cases
      Runtime language switch
      MVVM localization
      Multi-framework apps
    Tech Stack
      C#
      .NET
      XAML
      Roslyn
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add runtime language switching to a WPF, Avalonia, MAUI, WinUI, or Uno app

USE CASE 2

Share one localization model across multiple XAML frameworks in a single solution

USE CASE 3

Generate strongly typed translation keys from JSON or text catalogs at build time

USE CASE 4

Import and export XLIFF, gettext PO, RESX, or Android strings for a translation vendor

What is it built with?

C#.NETXAMLAvaloniaWPFMAUIRoslyn

How does it compare?

wieslawsoltes/protranslatebio-canse/fh6-afk-script-packrizwan3d/nanoagent.builder
Stars131313
LanguageC#C#C#
Setup difficultymoderateeasyhard
Complexity4/51/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Spans several NuGet packages and a source generator, so a new project must pick the right adapter and wire DI before runtime switching works.

In plain English

ProTranslate is a translation and globalization framework for .NET applications that build their user interface in XAML. The author targets desktop and mobile XAML stacks: Avalonia, WPF.NET MAUI, WinUI, and Uno. The goal is to give those apps one shared way to handle culture switching, localized strings, regional formatting, measurement units, and right-to-left or left-to-right text flow, without each framework needing its own setup. The design splits the code into a framework-neutral core and thin adapters per UI framework. The core packages, called ProTranslate.Abstractions and ProTranslate.Core, hold the interfaces and the runtime services: a culture service, a translation service, a globalization service, fallback rules, a cache policy, a region profile, and unit conversion. The adapter packages wire those services into each XAML system as markup extensions, attached properties, and binding refresh paths, so labels in XAML update when the user changes language at runtime. Two extra packages connect ProTranslate to older .NET localization stacks. ProTranslate.ResourceManager bridges the classic ResX resource manager and satellite assemblies. ProTranslate.MicrosoftExtensions plugs into Microsoft.Extensions dependency injection and the IStringLocalizer interface. Together they let teams adopt ProTranslate without throwing away an existing resource pipeline. ProTranslate also ships build-time tooling. A source generator reads text files and JSON catalogs and emits strongly typed key constants, accessor helpers, and a bindable strings object that compiled XAML bindings can use directly. A Roslyn analyzer warns about missing keys, placeholder mismatches, and catalog coverage gaps before runtime. A separate Formats package handles loss-aware import and export for industry translation files, including XLIFF, gettext PO and POT, RESX, Android strings.xml, Apple strings, Flutter ARB, i18next JSON, and CSV or TSV exchange. The README presents this as the first stable package set on NuGet. It is aimed at developers building MVVM apps who want one localization model across several XAML frameworks rather than separate solutions per platform.

Copy-paste prompts

Prompt 1
Walk me through adding ProTranslate to an Avalonia MVVM app with runtime language switching and a JSON catalog.
Prompt 2
Show me how to wire ProTranslate.MicrosoftExtensions into an existing IStringLocalizer pipeline without breaking my ResX files.
Prompt 3
Explain the source generator output of ProTranslate and how I bind compiled XAML to the bindable strings object.
Prompt 4
Help me export my translations to XLIFF using the Formats package and import the translated file back with no key loss.
Prompt 5
Configure ProTranslate fallback rules and cache policy for a MAUI app that ships English, German, and Arabic with RTL.

Frequently asked questions

What is protranslate?

Cross-framework localization and globalization library for .NET XAML apps, with one shared core and adapters for Avalonia, WPF, MAUI, WinUI, and Uno.

What language is protranslate written in?

Mainly C#. The stack also includes C#, .NET, XAML.

How hard is protranslate to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is protranslate for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.