Dosaic.Extensions.Localization.Abstractions 1.2.41

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

Dosaic.Extensions.Localization.Abstractions

Dosaic.Extensions.Localization.Abstractions is the annotation package for the Dosaic localization system. It provides the [LocalizedName] attribute and the Locale enum that the companion source generator (Dosaic.Extensions.Localization.Generator) reads at compile time to produce a static EntityLabels lookup class.

Installation

dotnet add package Dosaic.Extensions.Localization.Abstractions

Or as a PackageReference in your .csproj:

<PackageReference Include="Dosaic.Extensions.Localization.Abstractions" Version="" />

To also generate the EntityLabels lookup class, add the generator package:

<PackageReference Include="Dosaic.Extensions.Localization.Generator" Version=""
                  OutputItemType="Analyzer" ReferenceOutputAssembly="false" />

API

[LocalizedName]

Annotate classes, enums, enum members, properties, and fields with translated display names.

using Dosaic.Extensions.Localization;

[LocalizedName(en: "Order", de: "Bestellung")]
public class Order
{
    [LocalizedName(en: "Order Number", de: "Bestellnummer")]
    public string OrderNumber { get; set; }
}

[LocalizedName(en: "Order Status", de: "Bestellstatus")]
public enum OrderStatus
{
    [LocalizedName(en: "Active", de: "Aktiv")]
    Active,

    [LocalizedName(en: "Cancelled", de: "Storniert")]
    Cancelled
}
Property Type Description
En string English display name (defaults to "")
De string German display name (defaults to "")

Valid targets: Class, Enum, Property, Field (including enum members).

Locale

Strongly-typed culture discriminator used as a parameter in the generated EntityLabels.Get(...) overloads.

public enum Locale
{
    En,
    De
}

Use Locale.En / Locale.De instead of culture strings when calling the generated API.

Package Purpose
Dosaic.Extensions.Localization.Abstractions This package — attributes and Locale enum
Dosaic.Extensions.Localization.Generator Roslyn source generator — emits EntityLabels.g.cs and optional JSON translation files at compile time
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.
  • 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
1.2.41 96 9/7/2026
1.2.40 106 8/27/2026
1.2.40-alpha.1 60 8/27/2026
1.2.39 101 8/25/2026
1.2.38 121 7/30/2026
1.2.37 122 7/14/2026
1.2.36 120 7/10/2026
1.2.35 155 6/19/2026
1.2.34 123 6/10/2026
1.2.33 119 6/2/2026