添加项目文件。

This commit is contained in:
2025-12-02 13:10:10 +08:00
parent 93a2382a16
commit 289aa4cbe7
400 changed files with 91177 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
@inject ILocalizationService LocalizationService
@Text
@code {
private string? _text;
[Parameter]
public string Key { get; set; } = string.Empty;
[Parameter]
public string? Culture { get; set; }
private string Text => _text ?? Key;
protected override async Task OnParametersSetAsync()
{
await LoadText();
}
private async Task LoadText()
{
_text = await LocalizationService.GetStringAsync(Key, Culture) ?? Key;
StateHasChanged();
}
}