Runic.Translations.Templates 0.3.0-preview.1

This is a prerelease version of Runic.Translations.Templates.
dotnet new install Runic.Translations.Templates@0.3.0-preview.1
                    
This package contains a .NET Template Package you can call from the shell/command line.

Runic.Translations.Templates

Start a compiler-valid Runic Translations TOML locale project with MF2 messages or a complete .NET 10 localization class library.

Install

dotnet new install Runic.Translations.Templates::<VERSION>

Replace <VERSION> with the preview version shown on NuGet. The standalone project targets .NET 10 and pins the Runic Translations runtime, build package, and local tool to that exact release.

Create a complete project

dotnet new runic-translations-project \
  --name Example.Translations \
  --catalog app \
  --defaultLocale en \
  --namespace Example.Translations \
  --className AppText
cd Example.Translations
dotnet tool restore
dotnet build

The project template creates a class library with translations/runic.json with sourceLayout: "locale-toml", a default-locale TOML file containing MF2 messages, generated C# APIs, a pinned local tool manifest, and build-time ESM output. After building, application code can use the generated catalog:

using Example.Translations;
using Runic.Translations;

ITranslationManager manager = await AppTextCatalog.CreateManagerAsync();
var text = new AppText(manager);

Console.WriteLine(text.application_title);

Add catalog files to an existing project

dotnet new runic-translations \
  --output . \
  --catalog app \
  --defaultLocale en \
  --namespace Example.Translations \
  --className AppText

The item template creates translations/runic.json and a default-locale TOML file such as translations/en.toml. TOML tables group MF2 string values: [application] title generates the logical message ID application_title. Nested tables, dotted keys and inline tables use the same underscore-joined mapping; colliding IDs are rejected. Add the matching Runic.Translations and Runic.Translations.Build packages; the build discovers the conventional directory without MSBuild items.

Choose the project template for a complete .NET and ESM setup. Choose the item template when a project already owns package versions and build configuration. Use runic-translations init when you need multiple locales, explicit fallback edges, or optional starter content in one command.

Compatibility and status

Template output uses the package version embedded at packing time. If you pass --packageVersion, it must identify one matching release of the runtime, build package, and tool. Preview upgrades may change generated project files or source schemas; review the compatibility policy before updating an existing project.

Licensed under the MIT License.

  • net10.0

    • No dependencies.

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
0.3.0-preview.1 50 9/11/2026
0.2.0-preview.1 62 9/9/2026