Tlumach.NET for VS Code
Generate type-safe localization code directly from VS Code by running the Tlumach.NET code generator on-demand from the Explorer context menu.
Features
Run Generator
Execute the Tlumach.NET code generator to create C# source files from your translation files. The generator produces strongly-typed translation classes, eliminating magic strings and enabling IntelliSense support for all your translations.
- On-demand generation — Run the generator whenever you update your translation files
- Project-aware — Automatically detects projects with Tlumach configuration files
- Batch support — Run the generator across all projects in your workspace with a single command
- Live output — View generation progress and diagnostic messages in the Output panel
New Tlumach Files
VS Code has no "Add New Item" dialog, so the equivalent is offered as two commands, available from the Command Palette and from the Explorer context menu of a folder:
- Tlumach: New Translation File... — pick a format (JSON, ARB, INI, TOML, CSV, TSV, XLIFF, Apple String Catalog, or ResX) and a file name. The file is created with a few sample translation units and registered in the nearest
.csproj as an EmbeddedResource.
- Tlumach: New Configuration File... — pick a format (INI
.cfg, JSON .jsoncfg, TOML .tomlcfg, ARB .arbcfg, ResX .resxcfg, or XLIFF .xlfcfg) and a file name. The file is pre-filled with the project's root namespace and registered in the nearest .csproj as an AdditionalFiles item, which is what makes the Tlumach source generator pick it up.
A ResX translation file is created with a duplicate .resx extension and marked Non-Resx, so that the .NET toolchain embeds it verbatim instead of compiling it into a satellite assembly.
Installation
From VS Code Marketplace
- Open VS Code
- Go to the Extensions view (
Ctrl+Shift+X)
- Search for Tlumach.NET
- Click Install
Getting Started
Set Up Your Project
- Install the AlliedBits.Tlumach NuGet package in your project
- Add a Tlumach configuration file and translation files to your project as described in the documentation
Generate Code
- Right-click a
.csproj file in the Explorer and select Run Tlumach Generator to process that project
- Right-click a
.sln file in the Explorer and select Run Tlumach Generator (All Projects) to process every project in the solution
Generation output and any diagnostics are streamed live to the Tlumach Output channel.
Requirements
- VS Code 1.95.0 or later
- .NET runtime installed and available on
PATH
- AlliedBits.Tlumach NuGet package installed in your project
- Translation files in one or more projects
Documentation
For comprehensive guides, examples, and API documentation, visit the Tlumach.NET website, download the NuGet package, or browse the source code repository.
Support
Found an issue or have a feature request? Please report it on GitHub Issues.
About Tlumach.NET
Tlumach.NET is a flexible library that provides translation and localization for .NET applications. It supports multiple file formats (JSON, ARB, INI, TOML, CSV, TSV, ResX, XLIFF, Apple String Catalog), runtime language switching, XAML framework integrations, and Roslyn-based compile-time code generation for type-safe translation access.