Grip localization - "itemsPerPage"

10 posts, 0 answers
  1. Jiri
    Jiri avatar
    7 posts
    Member since:
    Mar 2016

    Posted 21 Jul Link to this post

    Hello, 

    I use a grip component from UI for ASP.NET MVC and I have a problem with localization of the grid. 

    The problem is on image "grid1.png". In a red rectangle there is the wrong localized text and in a green rectangle there is the right/correct localized text.

    I'm loading these javascripts on the web page (where variable culture is "cs-CZ"):

    <script src="@Url.Content("~/Scripts/kendo/cultures/kendo.culture." + culture + ".min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/messages/kendo.messages." + culture + ".min.js")"></script>
     
    <script>
            $(document).ready(function () {
                kendo.culture("@culture"); //culture of your choice
                $.validator.addMethod('date',
                   function (value, element) {
                       return this.optional(element) || kendo.parseDate(value)
                   });
            });
    </script>

    All javascripts, which are loaded on the web page, are on image "scripts.png". 

    Could you help me? 

    Thank you for your advice.

     

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 25 Jul Link to this post

    Hello Jiri,

    I would suggest you to see the demo below that demonstrates how the mentioned string is propriety localized:

    http://demos.telerik.com/aspnet-mvc/grid/localization

    See the demo and apply this appraoch in your case.

    Regards,
    Maria Ilieva
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jiri
    Jiri avatar
    7 posts
    Member since:
    Mar 2016

    Posted 26 Jul Link to this post

    Hello Maria, 

    the demo is very nice and I have already seen it.

    My problem is that a localization of a grid or a translation of texts in a grid work only partially. It's explaind on image grid1.png (in my first question), where there is one of texts translated correctly (a green rectangle) and other texts not. I have tried to translate of other texts and I found out that texts of buttons in the toolsbar of the grid weren't translated, too.

    I have checked that the script with translated texts is loaded on the page correctly.

    I don't know where is the problem. Thanks for your advice.

  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 28 Jul Link to this post

    Hi Jiri,

    You can use two approaches for localizing the text in the UI elements of the Grid. The first option is to use the available API and change the strings. Another approach is to use localization files that are available with the product distribution.

    Please examine the following threads that describe the approaches in more detail:



    Regards,
    Viktor Tachev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Jiri
    Jiri avatar
    7 posts
    Member since:
    Mar 2016

    Posted 01 Aug in reply to Viktor Tachev Link to this post

    Hi Viktor,

    I know there are two ways how to localize texts in the UI elements of the Grid. I have decided to do it through your libraries or cultures files. I have studied many materials and advices about it, but I have the problem permanently. 

    I send you files which I use in my project. Scripts for localization are loaded in the file "_Layout.cshtml" and other supporting scripts are loaded in it, too. The Grid is defined and used in the file "index.cshtml".

    Please, check my files whether they are correct. Thanks. 

     

  7. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 03 Aug Link to this post

    Hi Jiri,

    I examined the files and they seem correct. What I noticed was that you are using the previous version of the components.

    Would you update KendoUI to the latest release (currently version 2016.2.714) and see how it works for you? Please make sure that you replace all script and style files with the ones from the newer version.

    Regards,
    Viktor Tachev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Jiri
    Jiri avatar
    7 posts
    Member since:
    Mar 2016

    Posted 04 Aug Link to this post

    Hi Viktor, 

    I did the update KendoUI to the latest release and updated all files with references to css and js files but the problem with partial localization is still there. 

    I really don't know where the problem is.

    Thanks

  9. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 08 Aug Link to this post

    Hi Jiri,

    I double checked the kendo.messages.cs-CZ file in the latest version and the itemsPerPage is included there. The message should be localized as expected. Below you can find a screenshot showing how the file looks. Would you examine the file on your end and ensure that the property is present there?



    Regards,
    Viktor Tachev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. Jiri
    Jiri avatar
    7 posts
    Member since:
    Mar 2016

    Posted 08 Aug Link to this post

    Hi Viktor, 

    yes, itemsPerPage exists in my file "kendo.messages.cs-CZ" and contains a correct czech text, but the text in the Grid is still in English.I have created for you a screenshot of the developer tools from a web browser. 

    Jiri

  11. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 10 Aug Link to this post

    Hi,

    Can I kindly ask you to open a regular support ticket and send us sample runnable applictaion that demonstrates the described issue? Thus we will be able to revise the localization files locally and advise you further.

    Regards,
    Maria Ilieva
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready