Q3 beta: localization

10 posts, 0 answers
  1. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 28 Oct 2012 Link to this post

    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
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 31 Oct 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 31 Oct 2012 Link to this post

    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
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 05 Nov 2012 Link to this post

    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!
  6. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 05 Nov 2012 Link to this post

    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
  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 08 Nov 2012 Link to this post

    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!
  8. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 09 Nov 2012 Link to this post

    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
  9. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 09 Nov 2012 Link to this post

    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
  10. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 10 Nov 2012 Link to this post

    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
  11. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 15 Nov 2012 Link to this post

    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
Back to Top
Kendo UI is VS 2017 Ready