Ways to localize the language

Question: 

How do I localize the language for my users?


Code:

@using Syncfusion.Blazor.Grids

<SfGrid DataSource="@Orders" AllowPaging="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })" Height ="315">
   <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true"></GridEditSettings>
    <GridColumns>
        <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" IsPrimaryKey="true" TextAlign="TextAlign.Right" Width="120"></GridColumn>
        <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="120"></GridColumn>
        <GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" EditType="EditType.DatePickerEdit" Format="d" TextAlign="TextAlign.Right" Width="130" Type="ColumnType.Date"></GridColumn>
        <GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
    </GridColumns>
</SfGrid>

Where language localization is needed:

Image_3121_1708508285941


3 Replies

SP Sarveswaran Palani Syncfusion Team February 23, 2024 02:32 AM UTC

Hi Duong,

Greetings from Syncfusion support.

From your query, we suspect that you want to change the language of the application dynamically. We suggest you to use localization feature of Syncfusion component to overcome the reported issue at your end. Kindly refer the attached UG documentation link for your reference.


Reference: https://blazor.syncfusion.com/documentation/common/localization#localization-of-syncfusion-blazor-components


You may find runnable sample example in the following github repository.


https://github.com/SyncfusionExamples/blazor-localization

If you have any further queries, please get back to us.

Regards,
Sarvesh



IB IBS December 5, 2024 01:00 PM UTC

The examples in this github link do not work.



PS Prathap Senthil Syncfusion Team December 9, 2024 01:55 PM UTC

Hi IBS,

Based on the reported problem, we did not encounter any issues with the sample provided in the GitHub link below. Could you please further investigate the issue and let us know which specific sample link caused the problem? Additionally, kindly share the .NET version you are using. For your reference, we have attached a simple sample.

https://github.com/SyncfusionExamples/blazor-localization/tree/master/.NET%208%20Blazor%20Web%20App/Localization-with-static-culture


Regards,
Prathap Senthil


Attachment: Localizationwithstaticculture_4b7b2205.zip

Loader.
Up arrow icon