This is a migrated thread and some comments may be shown as answers.

Grip localization - "itemsPerPage"

9 Answers 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 21 Jul 2016, 11:04 AM

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.

 

9 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 25 Jul 2016, 10:15 AM
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
0
Jiri
Top achievements
Rank 1
answered on 26 Jul 2016, 11:40 AM

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.

0
Viktor Tachev
Telerik team
answered on 28 Jul 2016, 10:51 AM
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
0
Jiri
Top achievements
Rank 1
answered on 01 Aug 2016, 11:45 AM

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. 

 

0
Viktor Tachev
Telerik team
answered on 03 Aug 2016, 09:22 AM
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
0
Jiri
Top achievements
Rank 1
answered on 04 Aug 2016, 11:13 AM

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

0
Viktor Tachev
Telerik team
answered on 08 Aug 2016, 08:17 AM
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
0
Jiri
Top achievements
Rank 1
answered on 08 Aug 2016, 12:19 PM

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

0
Maria Ilieva
Telerik team
answered on 10 Aug 2016, 11:09 AM
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
Tags
Grid
Asked by
Jiri
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Jiri
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or