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

Q3 beta: localization

9 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
mgs
Top achievements
Rank 1
mgs asked on 28 Oct 2012, 11:19 AM
Is localization supported in Q3? What about the various strings that are output by the widgets or the framework? Can they be translated to other languages easily?

Maybe localization is already prepared by language-specific Javascript files, which contain nothing but text in one specific language? 

Michael G. Schneider

9 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 31 Oct 2012, 05:11 PM
Hello Michael,

I am not quite sure if I understand you correctly, but if you want to translate the strings that are outputed by the widgets in Kendo UI Web you can use the configuration options. If you are requesting something different please elaborate a bit more?

Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mgs
Top achievements
Rank 1
answered on 31 Oct 2012, 06:34 PM
Hello Iliana,

thanks a lot for the answer. I try to describe my question in more detail...

With Q2, many text strings that were output as part of the UI were included in different parts of the JavaScript files. For example, "{0} is required" used by the validator, or "Go to the next page" used by a grid. These strings were scattered over many files, being hard coded into your functions.

If you want to create a non-English application, this is a difficult situation. It would be much better, if all strings were in one single Javascript file. That file could be translated into other languages by your customers.

So, the question is: what has improved in Q3 for creating non-English applications.

I do know that I might give specific messages for each element, when using the validator (e.g. data-required-msg). However, this is far from perfect. I agree to do some translation work once. Then all future projects should benefit from it. This is not something that needs to be done for each individual textbox.

Changing the language should be as easy as changing the culture.

Michael G. Schneider
0
Iliana Dyankova
Telerik team
answered on 05 Nov 2012, 12:19 PM
Hi Michael,

Thank you for the detailed description. I am afraid the desired functionality is still not implemented in Kendo UI Web (currently it is available in Kendo UI for ASP.NET MVC) and each widget has to be localized separately. The good news is that such improvement for the framework is in our ToDo list. If you wish you may cast a vote or leave a comment for it here - the more votes collects, the sooner will be implemented. Please excuse us for the inconvenience caused.

Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mgs
Top achievements
Rank 1
answered on 05 Nov 2012, 02:06 PM
Hello Iliana,

thanks a lot for the answer.

I understand that with Kendo UI for ASP.NET MVC the desired functionality is already implemented. So all English text that is output to display screen will be in the foreign language. I tried as follows...

With Q3 I modified Areas\razor\Views\Shared\_WebLayout.cshtml by inserting

System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("de-DE");
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");

right before 

var culture = System.Threading.Thread.CurrentThread.CurrentCulture.ToString();

Then I opened the basic grid example. However, the navigation buttons' tooltips still show "Go to the first page" etc.

I am sure that the above code gets executed because I can hit a breakpoint. And because by switching from "de-DE" to "en-US" the month names inside the calendar get translated.

If you are sure that the above should work, then how should it work? Which component is responsible for translating the text? Is it ASP.NET? Is it Kendo UI? Is it done on the server? Is it done on the client?

When looking at the HTML code that gets generated, you can see that the "Go To the first page" is inserted literally into the code. So if there are two grids on a page, that text will be included twice. Wouldn't it be much better, if there were a Javascript file for each language where such text were stored? 

Michael G. Schneider
0
Iliana Dyankova
Telerik team
answered on 08 Nov 2012, 09:20 PM
Hello Michael,

The provided code snippets look OK and I believe they should work as expected. In order to assist you best I would like to ask you to provide a sample project that illustrates your current implementation. This way I would be able to check what is going on and advice you further.
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mgs
Top achievements
Rank 1
answered on 09 Nov 2012, 06:39 AM
Hello Iliana,

thanks a lot for the answer. I think another sample isn't needed. Just take the samples that were delivered with the Q3 installation and insert the two lines.

Then please look, whether the tooltips for the grids' buttons "go to first page, go to previous page, etc." are really in German.

Michael G. Schneider
0
mgs
Top achievements
Rank 1
answered on 09 Nov 2012, 07:40 PM
I just learned via a support ticket that localization does not work with the beta release. The satellite assemblies are part of the installation. Localization will work with the final release.

Michael G. Schneider
0
mgs
Top achievements
Rank 1
answered on 10 Nov 2012, 08:19 AM
Sorry, important typo in the last post. Of course, It should have read...

The satellite assemblies are not part of the installation.

Michael G. Schneider
0
mgs
Top achievements
Rank 1
answered on 15 Nov 2012, 06:30 PM
With the Q3 release the satelite assemblies are included. The English text that is output to display is mostly translated according to the thread's language. Some tooltips and other text is English-only. I issued a ticket regarding the missing translations.

Michael G. Schneider
Tags
General Discussions
Asked by
mgs
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
mgs
Top achievements
Rank 1
Share this question
or