Telerik UI to ASP.NET Core Hebrew Localization

1 Answer 21 Views
Grid Localization
Genady
Top achievements
Rank 1
Genady asked on 19 Jul 2022, 09:51 AM

Hello

We use Telerik UI to ASP.NET Core to build the Razor Page app.

After connecting Hebrew Localization

    <script src="~/kendo/js/jquery.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.all.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.aspnetmvc.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.culture.he-IL.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.messages.he-IL.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/jszip.min.js" asp-append-version="true"></script>

    <script>kendo.culture("he-IL");</script>

 

 

 

We get the following picture

The script file kendo.messages.he-il.js contains the following overrides

 

  /* Grid messages */

 

    if (kendo.ui.Grid) {

        kendo.ui.Grid.prototype.options.messages =

            $.extend(true, kendo.ui.Grid.prototype.options.messages, {

                "commands": {

                    "cancel": "בטל",

                    "canceledit": "בטל עריכה",

                    "create": "צור חדש",

                    "destroy": "מחק",

                    "edit": "עריכה",

                    "save": "שמור",

                    "select": "בחר",

                    "update": "עדכן"

                },

                "editable": {

                    "cancelDelete": "בטל מחיקה",

                    "confirmation": "האם הנך בטוח שברונך לבצע זאת?",

                    "confirmDelete": "אשר מחיקה"

                }

            });

    }

 

    /* Pager messages */

 

    if (kendo.ui.Pager) {

        kendo.ui.Pager.prototype.options.messages =

            $.extend(true, kendo.ui.Pager.prototype.options.messages, {

                "allPages": "All",

                "page": "עמוד",

                "display": "{0} - {1} מתוך {2} פריטים",

                "of": "מתוך {0}",

                "empty": "אין פריטים להצגה",

                "refresh": "רענן",

                "first": "לעמוד הראשון",

                "itemsPerPage": "פריטים בעמוד",

                "last": "לעמוד האחרון",

                "next": "לעמוד הבא",

                "previous": "לעמוד הקודם",

                "morePages": "עמודים נוספים"

            });

    } 

 

What we need to do to get localization at least within what is in the script?

 

Best regards

 

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 21 Jul 2022, 04:50 PM

Hi Genady,

Since you have submitted the same query as a support thread, I will post my response here in case someone else has the same question:

The reported behavior is a bug, and I have logged an item in our feedback portal on your behalf. You can follow the progress here:

https://feedback.telerik.com/aspnet-core-ui/1573365-missing-localization-messages-in-the-asp-net-core-grid-for-he-il-culture

Аs a token of gratitude, I have updated the points in your Telerik account for the bug report.

While the official fix is provided, you can pass the missing translations manually through the Grid configuration:

columns.Command(column =>
{
  column.Edit().Text("translated 'Edit' message");
  column.Destroy().Text("translated 'Delete' message");
});

.ToolBar(x => 
{
  x.Create().Text("צור חדש");
  x.Excel().Text("translated message");
  x.Search().Text("translated message");
})

 

 

Regards, Mihaela Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Tags
Grid Localization
Asked by
Genady
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or