LocalizationProvider.AspNetCore
8.2.2
dotnet add package LocalizationProvider.AspNetCore --version 8.2.2
NuGet\Install-Package LocalizationProvider.AspNetCore -Version 8.2.2
<PackageReference Include="LocalizationProvider.AspNetCore" Version="8.2.2" />
paket add LocalizationProvider.AspNetCore --version 8.2.2
#r "nuget: LocalizationProvider.AspNetCore, 8.2.2"
// Install LocalizationProvider.AspNetCore as a Cake Addin #addin nuget:?package=LocalizationProvider.AspNetCore&version=8.2.2 // Install LocalizationProvider.AspNetCore as a Cake Tool #tool nuget:?package=LocalizationProvider.AspNetCore&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
- LocalizationProvider (>= 8.2.2)
- LocalizationProvider.Abstractions (>= 8.2.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LocalizationProvider.AspNetCore:
Package | Downloads |
---|---|
LocalizationProvider.AdminUI.AspNetCore
Database driven localization provider. Admin UI for Asp.Net Core apps. |
|
OO.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 | 47 | 11/15/2024 |
8.2.0 | 4,214 | 9/23/2024 |
8.1.5 | 7,489 | 8/27/2024 |
8.1.4 | 5,723 | 8/15/2024 |
8.1.3 | 1,005 | 8/13/2024 |
8.1.2 | 1,013 | 8/7/2024 |
8.1.1 | 269 | 8/4/2024 |
8.1.0 | 8,314 | 6/5/2024 |
8.0.3 | 8,365 | 5/5/2024 |
8.0.2 | 7,601 | 3/28/2024 |
8.0.1 | 2,915 | 3/5/2024 |
8.0.0 | 3,189 | 2/17/2024 |
7.5.2 | 45,302 | 12/23/2023 |
7.5.1 | 112,616 | 1/1/2023 |
7.5.0 | 20,704 | 11/12/2022 |
7.4.0 | 11,344 | 9/29/2022 |
7.3.1 | 20,396 | 8/30/2022 |
7.3.0 | 13,542 | 6/9/2022 |
7.2.1 | 11,147 | 3/17/2022 |
7.2.0 | 15,917 | 3/3/2022 |
7.1.0 | 1,602 | 2/10/2022 |
7.0.0 | 18,775 | 1/23/2022 |
7.0.0-pre-0015 | 431 | 1/19/2022 |
7.0.0-pre-0014 | 377 | 1/16/2022 |
7.0.0-pre-0013 | 628 | 12/27/2021 |
7.0.0-pre-0012 | 543 | 11/30/2021 |
7.0.0-pre-0011 | 1,880 | 11/26/2021 |
7.0.0-pre-0010 | 5,675 | 11/24/2021 |
7.0.0-pre-0009 | 5,515 | 11/24/2021 |
7.0.0-pre-0008 | 4,793 | 11/24/2021 |
7.0.0-pre-0007 | 6,511 | 11/23/2021 |
7.0.0-pre-0006 | 1,547 | 10/31/2021 |
7.0.0-pre-0005 | 1,073 | 10/17/2021 |
7.0.0-pre-0004 | 622 | 10/4/2021 |
7.0.0-pre-0003 | 875 | 9/12/2021 |
7.0.0-pre-0002 | 555 | 8/30/2021 |
7.0.0-pre-0001 | 556 | 7/25/2021 |
6.5.0 | 9,951 | 5/7/2021 |
6.4.0 | 1,621 | 12/22/2020 |
6.3.0 | 1,166 | 10/27/2020 |
6.2.2 | 6,764 | 9/9/2020 |
6.2.1 | 834 | 9/9/2020 |
6.2.0 | 1,757 | 7/9/2020 |
6.1.1 | 853 | 6/19/2020 |
6.1.0 | 953 | 6/9/2020 |
6.0.3 | 1,285 | 3/18/2020 |
6.0.2 | 815 | 3/17/2020 |
6.0.1 | 887 | 3/16/2020 |
6.0.0 | 1,003 | 2/21/2020 |
5.7.1 | 8,911 | 7/14/2019 |
5.7.0 | 1,147 | 6/30/2019 |
5.6.0 | 2,103 | 5/7/2019 |
5.5.1 | 2,012 | 4/19/2019 |
5.5.0 | 1,230 | 4/8/2019 |
5.4.1 | 889 | 3/9/2019 |
5.4.0 | 1,199 | 2/28/2019 |
5.3.0 | 1,460 | 2/10/2019 |
5.1.0 | 1,697 | 1/13/2019 |
5.0.0 | 2,614 | 10/18/2018 |
4.3.0 | 2,068 | 8/22/2018 |
4.2.2 | 2,176 | 4/5/2018 |
4.1.1 | 1,195 | 1/27/2018 |
4.1.0 | 1,178 | 1/23/2018 |