loudenvier / kendo-global

Language packs for Telerik's Kendo UI (open source and commercial version)
87 stars 65 forks source link

itemsPerPage is not translated #42

Closed majsterka closed 10 years ago

majsterka commented 11 years ago

Hello, I`m using my own file, I have there kendo.ui.Pager.prototype.options.messages = $.extend(kendo.ui.Pager.prototype.options.messages, { .... itemsPerPage: "položiek na stránku", .....

but this only one item is not translated. Can you give me a suggestion where should be a problem? I`m using kendo 2013.2.716

loudenvier commented 10 years ago

Hi maksterka,

It should be working. Perhaps you have e syntax error somewhere... Or kendo 2013.2.716 changed this specific item... I'll have to take my time to take a look into it (I've just installed the latest kendo on my machine, but now I'm using the MVC Extensions, so Kendo-global is useless in this context, but I can make a sample project to test it...)

loudenvier commented 10 years ago

Hi again Maksterka,

I've just changed a sample page (the Brazilian Portuguese file) to use the same version of Kendo you're using and the itemsPerPage is working just fine. I've changed the file to:

<head>
    <meta charset="utf-8">
    <title></title>
    <script src="http://demos.kendoui.com/content/shared/js/people.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js"></script>
    <!--
     ! ALL THAT IS NEEDED IS TO INCLUDE THE DESIRED LANGUAGE FILE 
     !-->
    <script src="..\lang\kendo.pt-BR.js"></script>

    <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.rtl.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.dataviz.min.css" rel="stylesheet" />
    <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.dataviz.default.min.css" rel="stylesheet" />    

</head>
´´´

I'm also updating the repository with this changed file so that you can check it for yourself on your end.
vohuman commented 7 years ago

This is the solution if you work with .NET MVC: In C# kendo in the view you should write this way:

@(Html.Kendo().Grid<datamodel>()
      .DataSource(dataSource => dataSource
          .Model(model => model.Id(m => m.ID))))
     .Pageable(pager => pager
        .PreviousNext(true)
        .Messages(m => m.AllPages("All Pages").Display(" Display").Empty("").ItemsPerPage("").Last("Go to the last page").MorePages("").Next("").Of("").Page("").Previous("").Refresh("")
        )
)