Localization.SqlLocalizer 3.1.0

.NET 5.0 .NET Core 3.1 .NET Standard 2.0
Install-Package Localization.SqlLocalizer -Version 3.1.0
dotnet add package Localization.SqlLocalizer --version 3.1.0
<PackageReference Include="Localization.SqlLocalizer" Version="3.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Localization.SqlLocalizer --version 3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Localization.SqlLocalizer, 3.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Localization.SqlLocalizer as a Cake Addin
#addin nuget:?package=Localization.SqlLocalizer&version=3.1.0

// Install Localization.SqlLocalizer as a Cake Tool
#tool nuget:?package=Localization.SqlLocalizer&version=3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Documentation: http://localizationsqllocalizer.readthedocs.io/en/latest/

NuGet

https://www.nuget.org/packages/Localization.SqlLocalizer

Issues

https://github.com/damienbod/AspNetCoreLocalization/issues

Code

https://github.com/damienbod/AspNetCoreLocalization/tree/master/src/Localization.SqlLocalizer

Basic Usage ASP.NET Core

Add the NuGet package to the project.csproj file

"dependencies": {
        "Localization.SqlLocalizer": "3.1.0",

Add the DbContext and use the AddSqlLocalization extension method to add the SQL Localization package.

public void ConfigureServices(IServiceCollection services)
{
    // init database for localization
    var sqlConnectionString = Configuration["DbStringLocalizer:ConnectionString"];

    services.AddDbContext<LocalizationModelContext>(options =>
        options.UseSqlite(
            sqlConnectionString,
            b => b.MigrationsAssembly("ImportExportLocalization")
        ),
        ServiceLifetime.Singleton,
        ServiceLifetime.Singleton
    );

    // Requires that LocalizationModelContext is defined
    services.AddSqlLocalization(options => options.UseTypeFullNames = true);

Create your database

dotnet ef migrations add Localization --context localizationModelContext

dotnet ef database update Localization --context localizationModelContext

========================

ASP.NET Core MVC Localization Example

http://damienbod.com/2015/10/21/asp-net-5-mvc-6-localization/

http://damienbod.com/2015/10/24/using-dataannotations-and-localization-in-asp-net-5-mvc-6/

http://damienbod.com/2016/01/29/asp-net-core-1-0-using-sql-localization/

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

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
3.1.0 7,910 11/5/2021
3.0.0 9,355 11/13/2020
2.0.7 5,979 3/17/2020
2.0.6 5,296 9/23/2019
2.0.5 9,251 5/3/2019
2.0.4 559 4/2/2019
2.0.3 2,950 9/2/2018
2.0.2 5,878 8/31/2017
2.0.1 1,723 8/25/2017
2.0.0 1,585 8/19/2017
1.0.10 2,001 5/14/2017
1.0.9 1,207 3/10/2017
1.0.8 1,133 3/3/2017
1.0.7 6,173 2/5/2017
1.0.6 1,708 12/5/2016
1.0.5 1,216 11/27/2016
1.0.4 1,149 11/22/2016
1.0.3 1,351 7/15/2016
1.0.2 1,113 6/28/2016
1.0.1 1,140 5/26/2016
1.0.0 1,220 5/26/2016

Release Notes: Version 3.1.0 Add app support for Entity Framework 5.0