Localization.SqlLocalizer
3.1.0
dotnet add package Localization.SqlLocalizer --version 3.1.0
NuGet\Install-Package Localization.SqlLocalizer -Version 3.1.0
<PackageReference Include="Localization.SqlLocalizer" Version="3.1.0" />
paket add Localization.SqlLocalizer --version 3.1.0
#r "nuget: Localization.SqlLocalizer, 3.1.0"
// 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
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.EntityFrameworkCore (>= 3.0.0 && < 6.0.0)
- Microsoft.EntityFrameworkCore.InMemory (>= 3.0.0 && < 6.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 3.0.0 && < 6.0.0)
-
.NETStandard 2.0
- Microsoft.AspNetCore.Localization (>= 2.0.0 && < 3.0.0)
- Microsoft.EntityFrameworkCore (>= 2.0.0 && < 3.0.0)
- Microsoft.EntityFrameworkCore.InMemory (>= 2.0.0 && < 3.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 2.0.0 && < 3.0.0)
-
net5.0
- Microsoft.EntityFrameworkCore (>= 5.0.0)
- Microsoft.EntityFrameworkCore.InMemory (>= 5.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 5.0.0)
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 | 40,377 | 11/5/2021 |
3.0.0 | 12,614 | 11/13/2020 |
2.0.7 | 10,113 | 3/17/2020 |
2.0.6 | 14,594 | 9/23/2019 |
2.0.5 | 12,146 | 5/3/2019 |
2.0.4 | 792 | 4/2/2019 |
2.0.3 | 3,460 | 9/2/2018 |
2.0.2 | 6,646 | 8/31/2017 |
2.0.1 | 2,289 | 8/25/2017 |
2.0.0 | 2,162 | 8/19/2017 |
1.0.10 | 2,379 | 5/14/2017 |
1.0.9 | 1,513 | 3/10/2017 |
1.0.8 | 1,433 | 3/3/2017 |
1.0.7 | 6,992 | 2/5/2017 |
1.0.6 | 2,036 | 12/5/2016 |
1.0.5 | 1,513 | 11/27/2016 |
1.0.4 | 1,436 | 11/22/2016 |
1.0.3 | 1,669 | 7/15/2016 |
1.0.2 | 1,463 | 6/28/2016 |
1.0.1 | 1,473 | 5/26/2016 |
1.0.0 | 1,604 | 5/26/2016 |
Release Notes: Version 3.1.0 Add app support for Entity Framework 5.0