This is a migrated thread and some comments may be shown as answers.
About implementing Globalization in Kendo UI? Help please!
17 Answers 695 Views
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 15 Aug 2012, 06:52 PM
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,
 

17 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 17 Aug 2012, 01:35 PM
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!
0
Peter
Top achievements
Rank 1
answered on 24 Aug 2012, 01:01 AM
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
0
Atanas Korchev
Telerik team
answered on 24 Aug 2012, 07:06 AM
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!
0
Peter
Top achievements
Rank 1
answered on 27 Aug 2012, 02:04 AM
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
0
Atanas Korchev
Telerik team
answered on 27 Aug 2012, 12:29 PM
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!
0
Peter
Top achievements
Rank 1
answered on 28 Aug 2012, 08:52 AM
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"

0
Atanas Korchev
Telerik team
answered on 29 Aug 2012, 06:17 AM
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!
0
Peter
Top achievements
Rank 1
answered on 04 Sep 2012, 01:29 PM
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,
0
Atanas Korchev
Telerik team
answered on 04 Sep 2012, 02:06 PM
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!
0
Peter
Top achievements
Rank 1
answered on 04 Sep 2012, 02:14 PM
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

0
Atanas Korchev
Telerik team
answered on 04 Sep 2012, 02:44 PM
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!
0
Peter
Top achievements
Rank 1
answered on 04 Sep 2012, 02:55 PM
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>
0
Atanas Korchev
Telerik team
answered on 04 Sep 2012, 03:10 PM
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!
0
Peter
Top achievements
Rank 1
answered on 04 Sep 2012, 07:27 PM
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

0
Atanas Korchev
Telerik team
answered on 05 Sep 2012, 06:22 AM
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!
0
Calvin
Top achievements
Rank 2
answered on 17 Sep 2012, 09:12 PM
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!
0
balazs
Top achievements
Rank 2
answered on 26 Sep 2015, 09:19 AM

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

Asked by
Peter
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Peter
Top achievements
Rank 1
Calvin
Top achievements
Rank 2
balazs
Top achievements
Rank 2
Share this question
or