About implementing Globalization in Kendo UI? Help please!

18 posts, 0 answers
  1. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 15 Aug 2012 Link to this post

    Hi,
    I am trying to implement the globalization to my MVC web application by using Kendo UI, the only example I found is this :
    http://demos.kendoui.com/web/globalization/index.html
    Which only works on the Data field such as Time and Date, the label of each fields are not converted to other language.
    I also read the documentation related to Globalization in Kendo UI site, it is not enough to implement it to my project.
    I appreciate if anybody can provide some detailed documents or examples of implementing Globalization by using Kendo UI,
     So we can follow it step by step to implement it to our whole mvc application.

    Thanks a lot,
     
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 17 Aug 2012 Link to this post

    Hi Peter,

     The globalization feature of Kendo UI affects only date (date and month names) and number (currency symbol) formats. It will not change all labels in your page to a localized version.

    I suggest you check the excellent blog post of Scott Hanselman: Globalization, Internationalization and Localization in ASP.NET MVC 3

    Regards,
    Atanas Korchev
    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. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 23 Aug 2012 Link to this post

    Hi Atanas,
    We have purchased Kendo UI and implemented in our MVC 4 web application.
    We use Grid to show our data from SQL databases, can you tell me how to make the globalization working on Grid?
    Such as the column title of grid, and online editing (we need validation of online editing, the validation message need to be billingulized)? Click title to searching (a Kendo UI window popup to allow me enter the search category), how to localication those labels?
    I appreciate if you can provide example code how to achieve this. If it is hard to implement Kendo Ui in globalization and localization, we may think to use other tools.

    Thanks
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Aug 2012 Link to this post

    Hi,

     The column titles of the grid are just strings. You can just set the titles to their localized values:

          columns.Bound(o => o.OrderID).Title(Context.GetGlobalResourceString("MyResources", "OrderID")


    Localization of the validation messages is described in the linked blog post.

    On a side note how do you globalize the rest of your application (parts which do not include Kendo)? Could you show us some code? The same method should work with Kendo UI.

    I hope this helps,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 26 Aug 2012 Link to this post

    How to globalize the Filter window used in Grid?
    I am using telerik Kendo UI Grid view, in each column title, I applied Filter option, which popup a filer window with some fields such as:
    Show items with value that:
    Is equal to - this is a dropdown list field
    And  - another dropdown list field
    Filter and Clear button (on bottom of window)
    How to change all of text in this window to Another language when doing globalization and localization?
    Could you please post some examples ? thanks
  7. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 27 Aug 2012 Link to this post

    Hello,

     The easiest way would be to create a custom satellite assembly:
     1. Open the source code project which is located in the C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012\src\Kendo.Mvc folder
     2. Copy one of the existing Messages.*.resx files which can be found in the Resource folder of the Kendo.Mvc project
     3. Name that file Messages.<culture>.resx e.g. Messages.en-GB.rex
     4. Edit the strings from that resx file
     5. Build the Kendo.Mvc project. This would generate a new satellite assembly for your culture.
     6. Use the newly built Kendo.Mvc.dll in your application. The easiest way is to make Kendo.Mvc a project reference of your application.

    All the best,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 28 Aug 2012 Link to this post

    How to get this?
    "1. Open the source code project which is located in the C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012\src\Kendo.Mvc folder"
    From your post, I can see "Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now! "
    Can we get it from 30 days free trial version? or from OPEN Source (GPL v3) Kendo UI web? these are the link on your post:

    The one we have license is just some Javascripts libraries.  Not "C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012\src\Kendo.Mvc folder"

  9. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 29 Aug 2012 Link to this post

    Hello Peter,

     The source code is only available in the Kendo Complete for ASP.NET MVC commercial product.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 04 Sep 2012 Link to this post

    Hi Atanas,
    Based on your solution, I have to build the Kendo.mvc to get satelite assembly and reference it in my website,
    However, as my website is pure Javascript code, so I do not think my site can reference this satelite assembly, please let me know if there are any other solution? Or should I change my site from javascript code to Razor format in order to reference your satelite assembly? thanks a lot for your help,
  11. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 Sep 2012 Link to this post

    Hello,

    If your resources are named Resources.resx you can set the localization messages like this:

    $("#grid").kendoGrid( {
            filterable: {
                messages: {
                         info: "@Resources.FilterInfo",
                         filter: "@Resources.Filter" 
                }
            }
    } );

    The idea is to embed the localized messages in the final output of the page using Razor's @ clause.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  12. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 04 Sep 2012 Link to this post

    Hi Atanas,
    The thing is that my page is javascript file (something like myproject.js file), not Razor page,
    So @Resources.FilterInfo does not work in this case,
    Please let me know if you have other option. thanks

  13. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 Sep 2012 Link to this post

    Hello Peter,

     How do you localize the other parts of your page which do not involve Kendo UI? Show us some code. 
     
    Regards,

    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  14. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 04 Sep 2012 Link to this post

    Thanks for the quick response,
    Basically, all the pages with .cshtml are OK to apply the Resource file, as we can use @Resource.Info_Text in the page with @using Resources on the top of the page,
    However, in a page of xxx.js, the @Resources.Info_Text can not be recognized as I can not add usespace on the top of page as: @using Resouces.

    This one line of code in my Razor page:
    <li><a href="#/Contacts">@Resources.Info_Text</a></li>
  15. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 Sep 2012 Link to this post

    Hello,

     Indeed, you need a cshtml in order to use Razor expressions. You will not be able to localize your JavaScript files using Razor. The Kendo grid initialization should be moved in the cshtml files.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  16. Peter
    Peter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 04 Sep 2012 Link to this post

    So if my webpage was built as as javascript file such as (myproj.js), then I can not localize the Filter popup window as at all?
    Are there any other way to make the Filter window localized (display in two languages)?
    If I have to use Razor page in order to localize my Filter popup window, then I have to change my architecture to convert my pure javascript page to Razor page.
    Another option is like your mentioned here:
    #######################################
    Hello,

    The easiest way would be to create a custom satellite assembly:
    1. Open the source code project which is located in the C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012\src\Kendo.Mvc folder
    2. Copy one of the existing Messages.*.resx files which can be found in the Resource folder of the Kendo.Mvc project
    3. Name that file Messages.<culture>.resx e.g. Messages.en-GB.rex
    4. Edit the strings from that resx file
    5. Build the Kendo.Mvc project. This would generate a new satellite assembly for your culture.
    6. Use the newly built Kendo.Mvc.dll in your application. The easiest way is to make Kendo.Mvc a project reference of your application.
    ################################
    Since I can not reference satelite assembly in my .js page, so this option still not work as well.

    In one word, if my site is pure javascript file, then I can not localize filter popup window to reference Resources file (make it billingulized), please do let me know if you have any workaround solution without change my javascript page and still can globalize filter window. Thanks

  17. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 Sep 2012 Link to this post

    Hello,

     As far as we know there is no way to reference a .NET resource file in a JavaScript file. One needs to use a server-side technology which can embed values into the final output (Razor, ASPX etc).

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  18. Calvin
    Calvin avatar
    42 posts
    Member since:
    Jul 2011

    Posted 17 Sep 2012 Link to this post

    One point of confusion for me relating to this thread is the following:  What are the Kendo.Mvc.resources.dll files for?  I.e., the DLLs found in the C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012\wrappers\aspnetmvc\Binaries\Mvc3\<culture>\ directories.  Are not these the satellite assemblies?  And how are they used?  The kendo.culture() method is applied client side and therefore isn't affecting the razor helper used to generate the grid's UI.  And I don't see a corresponding .Culture() method on the Html.Kendo().Grid<ItemType>() helper.

    Thanks!
  19. balazs
    balazs avatar
    13 posts
    Member since:
    Dec 2014

    Posted 26 Sep 2015 in reply to Calvin Link to this post

    If you do pure JS, try use expressions like: kendo.ui.FilterMenu.prototype.options.operators.string.startswith

    Here you can find the JS side of the globalization 'stuff'. https://github.com/loudenvier/kendo-global/blob/master/lang/kendo.sk-SK.js

Back to Top
Kendo UI is VS 2017 Ready