dotnet-mlgen 0.1.0-tags-0-0-4.1

This is a prerelease version of dotnet-mlgen.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dotnet-mlgen --version 0.1.0-tags-0-0-4.1                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dotnet-mlgen --version 0.1.0-tags-0-0-4.1                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-mlgen&version=0.1.0-tags-0-0-4.1&prerelease                
nuke :add-package dotnet-mlgen --version 0.1.0-tags-0-0-4.1                

Multilingual File Generator (dotnet-mlgen)

A generator for .NET multilingual files for all native target platforms Windows, macOS, iOS, Android.

It can serve as a replacement for the Microsoft Multilingual App Toolkit.

Introduction

This tool can be used to generate multilingual files: Xliff and translated resource files.

This can be platform specific resource files for net8.0-android, net8.0-ios, net8.0-macos or Windows.

The Microsoft Multilingual App Toolkit no longer seems to support these specific native platforms.

Other advantages of using this dotnet tool:

  • It's not necessary to use Visual Studio since it's a .NET tool. Also Visual Studio upgrades won't break this tool.
  • It works on all platforms (Windows, Mac, Linux).
  • Since it needs to be triggered by hand it doesn't run every build which otherwise slows down the build since it updates files.
  • It uses a config file, so there is no magic.
  • The souce code is available at github.
  • It's compatible with the Multilingual App Toolkit.

Workflow

A configuration file needs to be in the project directory (Multilingual.config), for more info see below.

The config specifies the source resource (e.g. English language). The tool will create and update Xliff's depending on changes in the source resource. It will also generated localized target resources based on the Xliff.

Xliff can be editted with any Xliff editor or the Microsoft Multilingual App Toolkit Editor, see https://learn.microsoft.com/en-us/windows/apps/design/globalizing/multilingual-app-toolkit-editor-downloads.

Dotnet Tool

For more information about local/global .NET tools see https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools

Installation

Global

dotnet tool install --global dotnet-mlgen 

Local

dotnet new tool-manifest # if you are setting up this repo

dotnet tool install --local dotnet-mlgen

Restore in repo:

dotnet tool restore

Usage

Update translation files

  1. Go to project directory with Multilingual.config file.
  2. On prompt: dotnet mlgen (mlgen = Multilingual generator)

OR: On prompt: dotnet mlgen <full path to config file>.

Create first config file

Config file description

All paths for file generation are relative to the location of the config file.

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

This package has no dependencies.

Version Downloads Last updated
0.9.1 138 6/8/2024
0.9.0 98 6/8/2024
0.1.0 100 6/6/2024
0.1.0-tags-0-0-4.1 54 6/7/2024
0.1.0-tags-0-0-3.1 67 6/7/2024