AlliedBits.Tlumach.HandlebarsNet 2.1.2

dotnet add package AlliedBits.Tlumach.HandlebarsNet --version 2.1.2
                    
NuGet\Install-Package AlliedBits.Tlumach.HandlebarsNet -Version 2.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlliedBits.Tlumach.HandlebarsNet" Version="2.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlliedBits.Tlumach.HandlebarsNet" Version="2.1.2" />
                    
Directory.Packages.props
<PackageReference Include="AlliedBits.Tlumach.HandlebarsNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlliedBits.Tlumach.HandlebarsNet --version 2.1.2
                    
#r "nuget: AlliedBits.Tlumach.HandlebarsNet, 2.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlliedBits.Tlumach.HandlebarsNet@2.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlliedBits.Tlumach.HandlebarsNet&version=2.1.2
                    
Install as a Cake Addin
#tool nuget:?package=AlliedBits.Tlumach.HandlebarsNet&version=2.1.2
                    
Install as a Cake Tool

AlliedBits.Tlumach.HandlebarsNet lets Handlebars.Net templates use translations of Tlumach.NET, e.g. to render localized emails, reports, and documents.

  • handlebars.RegisterTlumach(Strings.TranslationManager) registers the t and t_html helpers.
  • {{t "Email.Greeting" name=customer.Name}} returns a translation with its placeholders filled: hash arguments for named placeholders, positional values for {0}, and ICU plural and select. A translation unit passed in the model can be used instead of a key.
  • The culture comes from the culture= argument, then from the @culture data of the render (template(model, new { culture })), then from the translation manager, so emails for many users can be rendered concurrently, each in its own language.
  • t is escaped in {{ }} and not in {{{ }}}, as any Handlebars value. t_html treats the translation as trusted HTML and always encodes the values it inserts, like a Handlebars helper that returns a SafeString: {{t_html ...}} and {{{t_html ...}}} render the same. Use it directly, not as a (t_html ...) subexpression, which an outer {{ }} would escape.
  • A missing key returns the key by default, or an empty string, or throws, or is handled by a callback.

Requires Handlebars.Net 2.1 or a later 2.x version and .NET 9 or later. Indexed {0} placeholders need the DotNet text processing mode of the configuration and ICU plural and select need Arb, so one configuration uses one of them. Handlebars.Net compiles templates at run time and is not suitable for NativeAOT. See the "Template Engines" topic in the documentation.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.2 77 11/20/2026
2.1.1 86 11/20/2026
2.1.0 86 11/19/2026
2.0.0 111 10/11/2026