Geaux.Localization 1.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Geaux.Localization --version 1.4.0
                    
NuGet\Install-Package Geaux.Localization -Version 1.4.0
                    
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="Geaux.Localization" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Geaux.Localization" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Geaux.Localization" />
                    
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 Geaux.Localization --version 1.4.0
                    
#r "nuget: Geaux.Localization, 1.4.0"
                    
#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 Geaux.Localization@1.4.0
                    
#: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=Geaux.Localization&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Geaux.Localization&version=1.4.0
                    
Install as a Cake Tool

Geaux.Localization

Tenant-aware, culture-aware, database-backed localization for .NET 8+ and .NET 9 applications.

Geaux.Localization provides a complete end-to-end localization system for multi-tenant and multi-culture applications. It integrates with Entity Framework Core and ASP.NET Core to deliver database-backed translations that respect the current tenant and culture for every request.

Features

  • Database-backed IStringLocalizer implementation with tenant and culture scoping
  • [Localized] attribute for annotating model properties that require translation keys
  • EF Core SaveChanges interceptor that automatically upserts translations for annotated properties
  • Seeder utility to create default translations across assemblies
  • DI extension for registering context, localizer, and supporting services from configuration
  • Support for SQL Server, PostgreSQL, MySQL/MariaDB, and Sqlite providers

Installation

Add the package reference to your project:

dotnet add package Geaux.Localization

Enable XML documentation so DocFX and IntelliSense can consume the inline XML comments:

<PropertyGroup>
  <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Configuration

Add a Localization section to your appsettings.json:

{
  "ConnectionStrings": {
    "LocalizationDb": "Server=localhost;Database=GeauxLocalization;Trusted_Connection=True;"
  },
  "Localization": {
    "DefaultCulture": "en-US",
    "SupportedCultures": [ "en-US", "fr-FR" ],
    "EnableCultureFallback": true,
    "ConnectionStringName": "LocalizationDb",
    "Provider": "SqlServer",
    "MigrationsAssembly": "Geaux.Migrations"
  }
}

Usage

Register the localization services in Program.cs:

using Geaux.Localization.Extensions;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGeauxLocalization(builder.Configuration);

Annotate model properties that need translations:

using Geaux.Localization.Attributes;

public class Product
{
    public string TenantId { get; set; } = "default";

    [Localized(
        key: "Product.Name",
        errorMessageKey: "Product.Name.Required",
        displayNameKey: "Product.Name.Label",
        displayMessageKey: "Product.Name.Description")]
    public string Name { get; set; } = string.Empty;
}

Translations are stored in the Translations table as rows identified by tenant, culture, and key. The LocalizationSaveChangesInterceptor keeps entries in sync during EF Core save operations.

Provider mapping

Provider value EF Core call Example
SqlServer UseSqlServer "Provider": "SqlServer"
PostgreSql UseNpgsql "Provider": "PostgreSql"
MySql/MariaDb UseMySql "Provider": "MySql"
Sqlite UseSqlite "Provider": "Sqlite"
LocalDb UseSqlServer "Provider": "LocalDb"

Documentation

Generate DocFX documentation (requires the docfx global tool):

dotnet tool install -g docfx
docfx docfx.json

The generated site will be available under the _site folder.

License

MIT License © Brent Lee Rigsby / GeauxCajunIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Geaux.Localization:

Package Downloads
Geaux.Localization.Admin

Geaux.Localization.Admin provides a plug‑and‑play Razor Class Library admin dashboard for managing localization keys, cultures, translations, and language packs. Includes CSV/JSON/ZIP export and import tooling, missing‑value repair, and multi‑tenant support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 141 1/5/2026
1.4.0 198 12/25/2025