![]() |
VOOZH | about |
dotnet add package idee5.Globalization.WebApi --version 3.2.1
NuGet\Install-Package idee5.Globalization.WebApi -Version 3.2.1
<PackageReference Include="idee5.Globalization.WebApi" Version="3.2.1" />
<PackageVersion Include="idee5.Globalization.WebApi" Version="3.2.1" />Directory.Packages.props
<PackageReference Include="idee5.Globalization.WebApi" />Project file
paket add idee5.Globalization.WebApi --version 3.2.1
#r "nuget: idee5.Globalization.WebApi, 3.2.1"
#:package idee5.Globalization.WebApi@3.2.1
#addin nuget:?package=idee5.Globalization.WebApi&version=3.2.1Install as a Cake Addin
#tool nuget:?package=idee5.Globalization.WebApi&version=3.2.1Install as a Cake Tool
Database driven tools for .NET localization. But different.
The existing solutions are well suited for tailormade products or products without any modifcations for customers or groups of customers.
Every industry has its own parlance. The same thing has a different name and your customers might not understand you or your product.
Maybe you need to create custom versions for your customers industries. Keeping text in your UI in sync with all the versions can quickly create a lot of overhead.
Sometimes customers addiotionally have their own terminology. The mess is even growing.
This is why we created our own implementation of a database driven localization library.
This library supports parlances for industries and customers. Every resource can have:
All hidden behind the standard .NET localization. There is no need to make big changes in your product. Only a little bit of configuration.
There are three nuget packages available.
The code below assumes you are using the .NET DI container.
Using the Options pattern you are able to set the industry and/or customer. Both being null would be the neutral/standard version.
services.Configure<ExtendedLocalizationOptions>(o => {
o.Customer = null;
o.Industry = null;
});
In production you should use another configuration provider. E.g. appsettings.json
Just replace the default StringLocalizerFactory.
// add the EF Core localization implementation
services.AddEFCoreLocalization(o => o.UseSqlite(new SimpleDB3ConnectionStringProvider().GetConnectionString("idee5.Resources.db3")));
By adding the controllers you can use web api calls to read and mange your resources.
// add the localization controllers
services.AddMvc().AddLocalizationControllers();
// configure the authorization policy
services.AddAuthorizationBuilder()
.AddPolicy("CommandPolicy", p => p.RequireAssertion(_ => true))
.AddPolicy("QueryPolicy", p => p.RequireAssertion(_ => true));
Protecting the localization controllers from unauthorized access can be configured with the QueryPolicy and the CommandPolicy.
For desktop applications we recommend using the commands and queries from idee5.Globalization directly.
For web applications we recommend the integration of the localization controllers from idee5.Globalization.WebApi into your application.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.