Mehrsprachige Unterstützung für ShowEnvelope-Seite hinzugefügt; Aktualisierung der resx-Dateien für Deutsch und Englisch (US).

This commit is contained in:
Developer 02
2024-05-28 18:01:32 +02:00
parent 3b27260b14
commit 89290c03f9
8 changed files with 59 additions and 16 deletions

View File

@@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Localization;
using System.Text.Encodings.Web;
using EnvelopeGenerator.Web.Models;
using EnvelopeGenerator.Application.Resources;
using System.Text.RegularExpressions;
namespace EnvelopeGenerator.Web.Controllers
{
@@ -92,7 +93,7 @@ namespace EnvelopeGenerator.Web.Controllers
else if (UserLanguage is not null && culture is not null)
return Redirect($"Locked");
ViewData["UserLanguage"] = UserLanguage ?? culture;
ViewData["UserCulture"] = _cultures[UserLanguage ?? culture];
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
Success: isExisting => isExisting ? View().WithData("EnvelopeKey", envelopeReceiverId) : this.ViewEnvelopeNotFound(),
@@ -175,6 +176,7 @@ namespace EnvelopeGenerator.Web.Controllers
//add PSPDFKit licence key
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
ViewData["UserCulture"] = _cultures[UserLanguage];
return View("ShowEnvelope", er);
},