Add localization support to the application
Added a package reference for `Microsoft.Extensions.Localization` to enable localization support. Registered localization services in `Program.cs` using `builder.Services.AddLocalization()`. Introduced the `Microsoft.Extensions.Localization` and `EnvelopeGenerator.Application.Resources` namespaces to support localized resources. These changes allow the application to provide content in multiple languages or regions.
This commit is contained in:
@@ -7,6 +7,8 @@ using EnvelopeGenerator.ReceiverUI.Options;
|
||||
using DevExpress.XtraReports.Services;
|
||||
using DevExpress.Blazor.Reporting;
|
||||
using DevExpress.XtraReports.Web.Extensions;
|
||||
using EnvelopeGenerator.Application.Resources;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
@@ -25,6 +27,9 @@ builder.Services.AddScoped<SignatureCacheService>();
|
||||
builder.Services.AddSingleton<AppVersionService>();
|
||||
builder.Services.AddScoped<EnvelopeService>();
|
||||
|
||||
// Localization services
|
||||
builder.Services.AddLocalization();
|
||||
|
||||
builder.Services.AddDevExpressWebAssemblyBlazorReportViewer();
|
||||
builder.Services.AddDevExpressWebAssemblyBlazorPdfViewer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user