Skip to content

Repository files navigation

YAFNET.LanguageManager

build statusNuGet

A .NET global tool for synchronizing, minifying, and automatically translating YetAnotherForum.NET JSON language files.

It keeps every *.json language file in a folder in sync with english.json — adding missing pages/resources, removing resources that no longer exist in the source, and optionally auto-translating new or untouched strings via Google Translate.

Prerequisites

  • .NET 10 SDK or later (runtime is enough to run the tool once installed)

Installation

Install as a global .NET tool:

dotnet tool install -g YAFNET.LanguageManager

Update to the latest version:

dotnet tool update -g YAFNET.LanguageManager

Uninstall:

dotnet tool uninstall -g YAFNET.LanguageManager

The tool is installed as yaf-langmgr.

Usage

yaf-langmgr <pathToLanguageFiles> [options]

The target folder must contain english.json (the source of truth) alongside the other <language>.json files to keep in sync.

Arguments

ArgumentDescription
pathToLanguageFilesPath to the folder containing english.json and the other language files. Relative paths are resolved against the current directory.

Options

OptionDescription
-syncSynchronize all language files against english.json: adds missing pages/resources (auto-translating new strings) and removes resources that no longer exist in the source.
-translateGoogleAuto-translate resources whose text still matches the English source, using the free Google Translate endpoint.
-minifyMinify all language files (compact JSON, no indentation).
-uglifyUn-minify all language files (pretty-printed, indented JSON).
-help, -?Show usage help.

Examples

Synchronize all language files in a folder with english.json, translating any new strings:

yaf-langmgr C:\YAF\Languages -sync

Synchronize and machine-translate any strings still left in English:

yaf-langmgr C:\YAF\Languages -sync -translateGoogle

Minify all language files before shipping a release:

yaf-langmgr C:\YAF\Languages -minify

Pretty-print previously minified language files for editing:

yaf-langmgr C:\YAF\Languages -uglify

License

YAFNET.LanguageManager is licensed under the Apache 2.0 license.

Yet Another Forum Community Support

If you have any questions, please visit the YAF Community Support forum: https://forum.yetanotherforum.net, or visit the Wiki for More Informations.

About

Tool for synchronization, packing and automatic translation of YAF.NET language files

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages