diff --git a/BlazorWebassemblyI18n/Pages/EmployeeData.razor b/BlazorWebassemblyI18n/Pages/EmployeeData.razor index ea03d87..6b41a6b 100644 --- a/BlazorWebassemblyI18n/Pages/EmployeeData.razor +++ b/BlazorWebassemblyI18n/Pages/EmployeeData.razor @@ -3,7 +3,7 @@ @inject IJSRuntime JSRuntime @inject Microsoft.Extensions.Localization.IStringLocalizer Localize -

@Localize["Employee Data"]

+

@title


@@ -67,11 +67,14 @@ @code{ Employee employee = new Employee(); List lstEmployees = new List(); + string title; + string companyName = "Phrase"; string[] TableHeader = { "Name", "Gender", "City", "Salary", "Joining Date" }; protected override async Task OnInitializedAsync() { + setTitle(); var empGetJS = (IJSInProcessRuntime)JSRuntime; var empList = await empGetJS.InvokeAsync("employeeData.get"); FetchEmployeeFromLocalStorage(empList); @@ -84,6 +87,8 @@ var empSetJS = (IJSInProcessRuntime)JSRuntime; empSetJS.InvokeVoid("employeeData.set", JsonConvert.SerializeObject(lstEmployees)); employee = new Employee(); + + string str = Localize["Employee Data"]; } void FetchEmployeeFromLocalStorage(string empList) @@ -94,6 +99,12 @@ } } + void setTitle() + { + string localizedTitle = Localize["Title"]; + title = string.Format(localizedTitle, companyName); + } + class Employee { public string Name { get; set; } diff --git a/BlazorWebassemblyI18n/Resources/App.ar.resx b/BlazorWebassemblyI18n/Resources/App.ar.resx index 69757ae..76253d3 100644 --- a/BlazorWebassemblyI18n/Resources/App.ar.resx +++ b/BlazorWebassemblyI18n/Resources/App.ar.resx @@ -144,4 +144,7 @@ حدد نوع الجنس + + {0} برنامج تعليمي بواسطة + \ No newline at end of file diff --git a/BlazorWebassemblyI18n/Resources/App.fr.resx b/BlazorWebassemblyI18n/Resources/App.fr.resx index 506b2cd..433fda8 100644 --- a/BlazorWebassemblyI18n/Resources/App.fr.resx +++ b/BlazorWebassemblyI18n/Resources/App.fr.resx @@ -144,4 +144,7 @@ Sélectionnez le sexe + + Tutoriel par {0} + \ No newline at end of file diff --git a/BlazorWebassemblyI18n/Resources/App.resx b/BlazorWebassemblyI18n/Resources/App.resx index 0014cfc..62d16af 100644 --- a/BlazorWebassemblyI18n/Resources/App.resx +++ b/BlazorWebassemblyI18n/Resources/App.resx @@ -144,4 +144,7 @@ Select Gender + + Tutorial by {0} + \ No newline at end of file