translord 0.1.4

Prefix Reserved
dotnet add package translord --version 0.1.4
                    
NuGet\Install-Package translord -Version 0.1.4
                    
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="translord" Version="0.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="translord" Version="0.1.4" />
                    
Directory.Packages.props
<PackageReference Include="translord" />
                    
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 translord --version 0.1.4
                    
#r "nuget: translord, 0.1.4"
                    
#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 translord@0.1.4
                    
#: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=translord&version=0.1.4
                    
Install as a Cake Addin
#tool nuget:?package=translord&version=0.1.4
                    
Install as a Cake Tool

translord

translord - simple TMS to get your translations up and running in no time.

🚧 Project still in the early stages of development

What this tool aims to achieve? To be a central place in your project that handles all things related to your translations:

  • storing
  • translating
  • delivering
  • management
  • revision

Packages structure

Configuration examples

WebApp with FileStore

builder.Services.AddTranslordFileStore(options =>
{
    options.TranslationsPath = Path.Combine(Directory.GetCurrentDirectory(), "translations");
});
builder.Services.AddTranslord(o =>
{
    List<Language> supportedLanguages = [Language.English, Language.Polish, Language.German];
    o.SupportedLanguages = supportedLanguages;
    o.IsCachingEnabled = true;
});

WebApp with PostgresStore and TMS panel

builder.Services.AddTranslordPostgresStore(options =>
    options.ConnectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? string.Empty);
builder.Services.AddTranslord(o =>
{
    List<Language> supportedLanguages = [Language.English, Language.Polish, Language.German];
    o.SupportedLanguages = supportedLanguages;
    o.IsCachingEnabled = true;
});
builder.AddTranslordManager();

Console app with FileStore

List<Language> supportedLanguages = [ Language.English, Language.Polish ];
var path = Path.Combine(Directory.GetCurrentDirectory(), "translations");
var deeplTranslator = new DeepLTranslator(new AddTranslordDeepLTranslatorOptions { AuthKey = "your-auth-key" });
var translator =
    new TranslatorConfiguration(
        new TranslatorConfigurationOptions { SupportedLanguages = supportedLanguages, DefaultLanguage = Language.English },
        new FileStore(new FileStoreOptions { TranslationsPath = path }, null),
        deeplTranslator).CreateTranslator();

var label = await translator.GetTranslation("label.test", Language.Polish);
var translations = await translator.GetAllTranslations(Language.English);

Custom implementations

You can configure your own custom implementations for the store, cache or translator in translord. Just implement specific interface and be sure to register it in DI:

builder.Services.AddTranslordCustomStore<CustomTranslationsStore>();
builder.Services.AddTranslordCustomCache<CustomTranslationsCache>();
builder.Services.AddTranslordCustomTranslator<CustomTranslationsTranslator>();

Import

For now, you can import your translations in one specific way. You need one .json file per language, with root object containing string key-value pairs of your translations. In the future there could be more import schemas added, please add an issue if you need support for specific import schema. Example of json that can be imported now:

{
    "label.add": "add",
    "label.delete": "delete",
    ...
}

See GitHub for more information and examples.

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.  net9.0 was computed.  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 was computed.  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 (4)

Showing the top 4 NuGet packages that depend on translord:

Package Downloads
translord.Manager

translord.Manager - package containing TMS admin panel for translord.

translord.DeepL

translord.DeepL - package using DeepL for texts translation in translord.

translord.EntityFramework

translord.EntityFramework - package containing configuration of the translations store using EF Core for translord.

translord.RedisCache

translord.RedisCache - package containing configuration of the translations cache using Redis for translord.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.4 231 6/1/2024
0.1.3 224 5/26/2024
0.1.2 275 5/23/2024
0.1.1 171 5/22/2024
0.1.0 173 5/22/2024