Fix: add @namespace to MultiLangInput so Blazor can recognize the component class

This commit is contained in:
Saidamin Kattan
2026-08-09 02:46:52 +03:00
parent f36ef4e623
commit 149c672451
240 changed files with 71 additions and 9877 deletions
+27 -7
View File
@@ -1,7 +1,20 @@
@namespace ECommerce.Module.Components.Shared
@using System.Globalization
<div class="space-y-2">
<div>DEBUG: ActiveCulture=@ActiveCulture, HideTabs=@HideTabs, IsTextArea=@IsTextArea</div>
@if (!HideTabs)
{
<div class="flex flex-wrap gap-2 mb-2">
@foreach (var culture in SupportedCultures)
{
<button type="button" @onclick="() => SelectCulture(culture.Key)"
class="btn btn-sm @(ActiveCulture == culture.Key ? "btn-primary" : "btn-ghost")">
@culture.Value
</button>
}
</div>
}
<div class="relative">
@if (IsTextArea)
{
@@ -14,6 +27,13 @@
placeholder="@(Placeholder)" />
}
</div>
@if (Value != null && Value.ContainsKey(ActiveCulture))
{
<div class="text-xs opacity-50 text-right">
Chars: @Value[ActiveCulture].Length
</div>
}
</div>
@code {
@@ -27,12 +47,12 @@
[Parameter] public bool HideTabs { get; set; } = false;
private static readonly Dictionary<string, string> SupportedCultures = new()
{
{ "en", "English" },
{ "ar", "العربية" },
{ "es", "Español" },
{ "de", "Deutsch" }
};
{
{ "en", "English" },
{ "ar", "العربية" },
{ "es", "Español" },
{ "de", "Deutsch" }
};
protected override void OnInitialized()
{