LocalizationProvider.Abstractions
8.2.2
dotnet add package LocalizationProvider.Abstractions --version 8.2.2
NuGet\Install-Package LocalizationProvider.Abstractions -Version 8.2.2
<PackageReference Include="LocalizationProvider.Abstractions" Version="8.2.2" />
paket add LocalizationProvider.Abstractions --version 8.2.2
#r "nuget: LocalizationProvider.Abstractions, 8.2.2"
// Install LocalizationProvider.Abstractions as a Cake Addin #addin nuget:?package=LocalizationProvider.Abstractions&version=8.2.2 // Install LocalizationProvider.Abstractions as a Cake Tool #tool nuget:?package=LocalizationProvider.Abstractions&version=8.2.2
Supporting LocalizationProvider
If you find this library useful, cup of coffee would be awesome! You can support further development of the library via Paypal.
Localization Provider v8.0 IS OUT!
I'm pleased to announce that Localization Provider v8.0 is finally out. Again - took a bit longer than expected 😃
What's new?
- .NET8 set as default target
- Added provider model for translations - starting with Azure AI for automatic translations
ConfigurationContext
now supports config configuration as well (you can change some settings after you have added and configured default settings for localization provider). This is very useful in unit test scenarios when you need to adjust some settings for specific test.- Various bug fixes
- Some performance improvements (resource key comparison, pagination in Admin UI)
- Security improvements (by default upgrading insecure connections)
- Dependencies upgrade
More info in this blog post.
What is the LocalizationProvider project?
LocalizationProvider project is ASP.NET Mvc web application localization provider on steroids.
Giving you the main following features:
- Database-driven localization provider for Asp.Net Mvc applications projects
- Easy resource registrations via code
- Supports hierarchical resource organization (with help of child classes)
- Administration UI for editors to change or add new translations for required languages
Getting Started (.NET)
Bare Minimum to Start With
Below are code fragments that are essential to get started with a localization provider.
Install required packages:
> dotnet add package LocalizationProvider.AspNetCore
> dotnet add package LocalizationProvider.AdminUI.AspNetCore
> dotnet add package LocalizationProvider.Storage.SqlServer
Following service configuration (usually in Startup.cs
) is required to get the localization provider working:
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// add your authorization provider (asp.net identity, identity server, whichever..)
services
.AddControllersWithViews()
.AddMvcLocalization();
services.AddRazorPages();
services.AddRouting();
services.AddDbLocalizationProvider(_ =>
{
_.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"));
...
});
services.AddDbLocalizationProviderAdminUI(_ =>
{
...
});
}
...
}
And following setup of the application is required as a minimum (also usually located in Startup.cs
):
public class Startup
{
...
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseDbLocalizationProvider();
app.UseDbLocalizationProviderAdminUI();
app.UseDbLocalizationClientsideProvider(); //assuming that you like also Javascript
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapRazorPages();
endpoints.MapDbLocalizationAdminUI();
endpoints.MapDbLocalizationClientsideProvider();
});
}
}
Also, you can refer to sample app in GitHub for some more hints if needed.
More Detailed Help
- Getting Started
- Getting Started with AdminUI
- Localizing App Content
- Localizing View Model (with DataAnnotations attributes)
- Localizing Client-side
Working with DbLocalizationProvider Stuff
- Localized Resource Types
- Synchronization Process
- MSSQL Storage Configuration
- Working with Resources
- Working with Languages
- Translating System.Enum Types
- Mark Required Fields
- Foreign Resources
- Hidden Resources
- Reference Other Resource
- Cache Event Notifications
- XLIFF Support
- CSV Support
- Migrations & Refactorings
Integrating with Optimizely
- For more information about Optimizely integration - read here
Other Versions
Localization Provider v7.x Released
Please read more in this blog post!
Upgrade to v7.x?
Please read more details in this blog post!
More Info
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (20)
Showing the top 5 NuGet packages that depend on LocalizationProvider.Abstractions:
Package | Downloads |
---|---|
LocalizationProvider
Database driven localization provider |
|
LocalizationProvider.AspNet
LocalizationProvider support package for Asp.Net |
|
LocalizationProvider.Storage.SqlServer
SqlServer storage implementation for DbLocalizationProvider package |
|
LocalizationProvider.AspNetCore
Database driven localization provider. Asp.Net Core support package |
|
LocalizationProvider.AdminUI.AspNetCore
Database driven localization provider. Admin UI for Asp.Net Core apps. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.2.2 | 460 | 11/15/2024 |
8.2.1 | 1,390 | 11/3/2024 |
8.2.0 | 5,847 | 9/23/2024 |
8.1.6 | 6,954 | 9/2/2024 |
8.1.5 | 6,924 | 8/27/2024 |
8.1.4 | 6,256 | 8/15/2024 |
8.1.3 | 1,240 | 8/13/2024 |
8.1.2 | 986 | 8/7/2024 |
8.1.1 | 315 | 8/4/2024 |
8.1.0 | 10,040 | 6/5/2024 |
8.0.3 | 10,374 | 5/5/2024 |
8.0.2 | 8,824 | 3/28/2024 |
8.0.1 | 4,058 | 3/5/2024 |
8.0.0 | 5,455 | 2/17/2024 |
7.5.2 | 45,467 | 12/23/2023 |
7.5.1 | 121,211 | 1/1/2023 |
7.5.0 | 23,187 | 11/12/2022 |
7.4.0 | 16,367 | 9/29/2022 |
7.3.1 | 39,722 | 8/30/2022 |
7.3.0 | 23,696 | 6/9/2022 |
7.2.1 | 25,852 | 3/17/2022 |
7.2.0 | 17,638 | 3/3/2022 |
7.1.0 | 7,669 | 2/10/2022 |
7.0.0 | 15,068 | 1/23/2022 |
7.0.0-pre-0015 | 1,330 | 1/19/2022 |
7.0.0-pre-0014 | 1,252 | 1/16/2022 |
7.0.0-pre-0013 | 1,565 | 12/27/2021 |
7.0.0-pre-0012 | 1,465 | 11/30/2021 |
7.0.0-pre-0011 | 2,710 | 11/26/2021 |
7.0.0-pre-0010 | 6,592 | 11/24/2021 |
7.0.0-pre-0008 | 5,761 | 11/24/2021 |
7.0.0-pre-0007 | 7,408 | 11/23/2021 |
7.0.0-pre-0006 | 2,740 | 10/31/2021 |
7.0.0-pre-0005 | 2,181 | 10/17/2021 |
7.0.0-pre-0004 | 1,734 | 10/4/2021 |
7.0.0-pre-0003 | 1,965 | 9/12/2021 |
7.0.0-pre-0002 | 1,722 | 8/30/2021 |
7.0.0-pre-0001 | 1,905 | 7/25/2021 |
6.5.3 | 12,018 | 5/22/2023 |
6.5.2 | 30,874 | 2/27/2022 |
6.5.1 | 2,257 | 2/27/2022 |
6.5.0 | 67,166 | 5/7/2021 |
6.4.0 | 22,433 | 12/22/2020 |
6.3.0 | 6,792 | 10/27/2020 |
6.2.2 | 12,590 | 9/9/2020 |
6.2.1 | 3,322 | 9/9/2020 |
6.2.0 | 39,291 | 7/9/2020 |
6.1.0 | 5,577 | 6/9/2020 |
6.0.2 | 15,852 | 3/17/2020 |
6.0.1 | 2,847 | 3/16/2020 |
6.0.0 | 2,862 | 2/21/2020 |
5.8.2 | 117,010 | 1/29/2020 |
5.7.7 | 40,315 | 11/23/2019 |
5.7.5 | 36,777 | 9/29/2019 |
5.7.4 | 21,716 | 9/14/2019 |
5.7.3 | 5,975 | 8/16/2019 |
5.7.1 | 32,231 | 7/14/2019 |
5.7.0 | 3,436 | 6/30/2019 |
5.6.0 | 12,870 | 5/7/2019 |
5.5.1 | 8,496 | 4/19/2019 |
5.5.0 | 5,974 | 4/8/2019 |
5.4.0 | 13,365 | 2/28/2019 |
5.3.0 | 9,047 | 2/10/2019 |
5.1.0 | 3,984 | 1/13/2019 |
5.0.0 | 22,250 | 10/18/2018 |
4.2.2 | 43,643 | 4/4/2018 |
4.2.1 | 1,309 | 3/30/2018 |
4.2.0 | 2,678 | 3/3/2018 |
4.1.0 | 10,240 | 1/23/2018 |
4.0.0 | 3,045 | 12/29/2017 |
2.11.3 | 5,420 | 12/21/2017 |
2.11.1 | 2,375 | 12/6/2017 |
2.11.0 | 1,764 | 12/2/2017 |
2.10.0 | 2,057 | 11/26/2017 |
2.9.0 | 20,285 | 10/9/2017 |
2.8.0 | 4,952 | 8/15/2017 |
2.7.0 | 5,126 | 7/5/2017 |
2.6.2 | 2,500 | 6/8/2017 |
2.6.1 | 1,862 | 5/22/2017 |
2.6.0 | 3,718 | 4/24/2017 |
2.5.0 | 3,455 | 3/19/2017 |
2.3.2 | 1,874 | 6/8/2017 |
2.3.1 | 1,793 | 5/22/2017 |
2.3.0 | 5,925 | 2/16/2017 |
2.2.0 | 1,187 | 2/16/2017 |
2.1.0 | 5,170 | 11/3/2016 |