Packages
Since version 2.0, Tlumach is distributed as a core package and a set of integration packages. Reference the integration package of the framework that your application uses: it depends on the core package AlliedBits.Tlumach (of exactly the same version), so NuGet adds the core package, too. Only the assemblies of the packages that you reference end up in your build and publish output.
The core package
AlliedBits.Tlumach contains everything that does not depend on an application framework:
| Assembly | Contents |
|---|---|
Tlumach.Base |
The parsers of translation files, TranslationConfiguration, and the ICU and placeholder engine. |
Tlumach |
TranslationManager, TranslationUnit, and the engine-neutral support of template engines. |
Tlumach.DataAnnotations |
The localized validation attributes (.NET 9 and .NET 10 only), see Localization of Data Annotations. |
Tlumach.Generator |
Generator, included as a source generator (analyzer). |
The core package supports .NET 10, .NET 9, and .NET Standard 2.0 (and so .NET Framework 4.7.2 and later).
The project with translations, which is processed by Generator, references the core package or, for WinUI (and Uno Platform), UWP, and Avalonia, the integration package of the platform, because the class generated for these platforms uses the TranslationUnit class of the integration. Every package listed below passes Generator on to the projects that reference it, so an application that keeps its translations in its own project needs only the integration package.
Generator runs with the .NET 8 SDK or later and with Visual Studio 2022 17.8 or later, see Generator.
The integration packages
| Package | Use it in | Assemblies | Depends on |
|---|---|---|---|
AlliedBits.Tlumach.WPF |
WPF applications (.NET 9 and .NET 10) | Tlumach.WPF |
|
AlliedBits.Tlumach.WinForms |
Windows Forms applications (.NET Framework 4.7.2, .NET 9, and .NET 10) | Tlumach.WinForms |
|
AlliedBits.Tlumach.WinUI |
WinUI 3 and Uno Platform applications | Tlumach.WinUI |
|
AlliedBits.Tlumach.UWP |
UWP applications on .NET 9 and .NET 10 (Windows SDK 10.0.17763 or later) | Tlumach.UWP |
|
AlliedBits.Tlumach.MAUI |
.NET MAUI applications | Tlumach.MAUI |
Microsoft.Maui.Controls (9.0.0 or later for .NET 9, 10.0.0 or later for .NET 10) |
AlliedBits.Tlumach.Avalonia |
Avalonia 11 and Avalonia 12 applications | Tlumach.Avalonia |
Avalonia (11.x or 12.x) |
AlliedBits.Tlumach.Blazor |
Blazor applications and their WebAssembly clients | Tlumach.Blazor |
AlliedBits.Tlumach.Web, AlliedBits.Tlumach.Extensions.Localization, Microsoft.AspNetCore.Components.Web (9.0.0 or later for .NET 9, 10.0.0 or later for .NET 10) |
AlliedBits.Tlumach.AspNetCore |
ASP.NET Core, MVC, and Razor Pages applications, and the server projects of Blazor applications | Tlumach.AspNetCore, Tlumach.AspNetCore.Mvc |
AlliedBits.Tlumach.Web, AlliedBits.Tlumach.Extensions.Localization, the ASP.NET Core shared framework |
AlliedBits.Tlumach.Web |
Normally added as a dependency of the Blazor and ASP.NET Core packages | Tlumach.Web |
Microsoft.Extensions.DependencyInjection.Abstractions (9.0.0 or later for .NET 9, 10.0.0 or later for .NET 10) |
AlliedBits.Tlumach.Extensions.Localization |
Applications that use IStringLocalizer and dependency injection, see Dependency Injection |
Tlumach.Extensions.Localization |
Microsoft.Extensions.Localization.Abstractions, Microsoft.Extensions.DependencyInjection.Abstractions (9.0.0 or later for .NET 9, 10.0.0 or later for .NET 10) |
AlliedBits.Tlumach.MudBlazor |
Blazor applications with MudBlazor, see Getting Started and Localization of MudBlazor | Tlumach.MudBlazor |
AlliedBits.Tlumach.Blazor, MudBlazor (9.x) |
AlliedBits.Tlumach.Syncfusion.Blazor |
Blazor applications with Syncfusion Blazor, see Getting Started and Localization of Syncfusion Blazor | Tlumach.Syncfusion.Blazor |
AlliedBits.Tlumach.Blazor, Syncfusion.Blazor.Core (29.1.33 or later) |
AlliedBits.Tlumach.FluentValidation |
Applications with FluentValidation, see Getting Started and Localization of FluentValidation | Tlumach.FluentValidation |
FluentValidation (12.x), Microsoft.Extensions.DependencyInjection.Abstractions (9.0.0 or later for .NET 9, 10.0.0 or later for .NET 10) |
AlliedBits.Tlumach.Scriban, AlliedBits.Tlumach.Fluid, AlliedBits.Tlumach.HandlebarsNet |
Template engines, see Getting Started for Scriban, Fluid, and Handlebars.Net, and Template Engines | Tlumach.Scriban, Tlumach.Fluid, Tlumach.HandlebarsNet |
the template engine: Scriban (7.2.2 or later within 7.x), Fluid.Core (2.40 or later within 2.x), Handlebars.Net (2.1 or later within 2.x) |
AlliedBits.Tlumach.Writers |
Export and conversion of translations, see Writers | Tlumach.Writers |
System.Text.Json (10.0.0 or later) and System.Memory (4.6.3 or later) for .NET Standard 2.0, as the core package |
Every integration package depends on AlliedBits.Tlumach in addition to the packages listed. The packages of Tlumach depend on each other with an exact version, so all packages of Tlumach used by an application must have the same version. When you update one, update all of them.
The packages of WPF, Windows Forms, WinUI, and UWP do not depend on a framework package: WPF and Windows Forms are parts of the Windows desktop shared framework, a WinUI application chooses its own version of Windows App SDK or Uno Platform, and a UWP application uses the Windows SDK projection of its own target framework.
An application can reference several integration packages, e.g. AlliedBits.Tlumach.WPF together with AlliedBits.Tlumach.Blazor in a Blazor Hybrid application, or AlliedBits.Tlumach.Blazor together with AlliedBits.Tlumach.AspNetCore in the server project of a Blazor Web App.
Upgrading from version 1.x
Up to version 1.12, the AlliedBits.Tlumach package contained all integration assemblies. When you upgrade to version 2.0:
- In the projects with translations, keep the reference to
AlliedBits.Tlumach, except for WinUI (and Uno Platform), UWP, and Avalonia: there, replace it with the integration package of the platform (AlliedBits.Tlumach.WinUI,AlliedBits.Tlumach.UWP, orAlliedBits.Tlumach.Avalonia), which these projects need for theTranslationUnitclass of the platform. Such a project must target .NET 9 or later. - In the application projects, add the integration packages that correspond to the
Tlumach.*namespaces that the projects use (e.g.AlliedBits.Tlumach.WPFforTlumach.WPF, orAlliedBits.Tlumach.AspNetCoreforTlumach.AspNetCore.Mvc). A reference toAlliedBits.Tlumachin these projects can then be removed. - Remove the targets that excluded unused Tlumach assemblies from the build output, if you added them, as they are no longer needed.