-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationv6.0The biggest major update coming in May 2023The biggest major update coming in May 2023
Description
create blazor component AppTranslation.razor
@if (Values is null)
{
@languageContainer.Keys[Key]
}
else
{
@languageContainer.Keys[Key, Values]
}
@code {
[Parameter]
public required string Key { get; set; }
[Parameter]
public Object? Values { get; set; }
protected override void OnInitialized()
{
languageContainer.InitLocalizedComponent(this);
base.OnInitialized();
}
}
then in any where inside your project you can use it like
<AppTranslation Key="HomePage:Title" />
by this way all text will update immediately when you change lang
aksoftware98
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationv6.0The biggest major update coming in May 2023The biggest major update coming in May 2023