Localization.SqlLocalizer 3.0.0

SQL Localizer for ASP.NET Core, dotnet

Install-Package Localization.SqlLocalizer -Version 3.0.0
dotnet add package Localization.SqlLocalizer --version 3.0.0
<PackageReference Include="Localization.SqlLocalizer" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Localization.SqlLocalizer --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Localization.SqlLocalizer, 3.0.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.0.0

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

Build status | NuGet Status

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

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

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

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

Basic Usage ASP.NET Core

Add the NuGet package to the project.csproj file

"dependencies": {
        "Localization.SqlLocalizer": "3.0.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/

Build status | NuGet Status

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

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

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

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

Basic Usage ASP.NET Core

Add the NuGet package to the project.csproj file

"dependencies": {
        "Localization.SqlLocalizer": "3.0.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/

Release Notes

Release Notes: Version 3.0.0 .NET 5

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.0 1,685 11/13/2020
2.0.7 4,221 3/17/2020
2.0.6 3,825 9/23/2019
2.0.5 6,286 5/3/2019
2.0.4 376 4/2/2019
2.0.3 2,477 9/2/2018
2.0.2 4,636 8/31/2017
2.0.1 755 8/25/2017
2.0.0 636 8/19/2017
1.0.10 1,555 5/14/2017
1.0.9 839 3/10/2017
1.0.8 769 3/3/2017
1.0.7 5,563 2/5/2017
1.0.6 1,361 12/5/2016
1.0.5 902 11/27/2016
1.0.4 805 11/22/2016
1.0.3 1,082 7/15/2016
1.0.2 823 6/28/2016
1.0.1 791 5/26/2016
1.0.0 839 5/26/2016