在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):damienbod/AspNetCoreLocalization开源软件地址(OpenSource Url):https://github.com/damienbod/AspNetCoreLocalization开源编程语言(OpenSource Language):C# 93.1%开源软件介绍(OpenSource Introduction):
======================== Documentation: http://localizationsqllocalizer.readthedocs.io/en/latest/ 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
======================== ASP.NET Core MVC Localization Example
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论