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

Localization issue with 3+ languages

3 Answers 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ezequiel
Top achievements
Rank 2
Ezequiel asked on 15 Sep 2014, 02:54 PM
Our system is multi-language, but localization for grids was only working to English.Then, we added Kendo.Mvc.resources.dll to our projects, but then, grids buttons/messages/etc are only in English and this other language.

How can make it work to more languages?

we have this configured:
<% var culture = System.Threading.Thread.CurrentThread.CurrentCulture.ToString(); %>
<script src="<%= this.ResolveUrl("~/Scripts/kendo/2014.2.903/cultures/kendo.culture." + culture + ".min.js") %>" type="text/javascript"></script>
<script type="text/javascript">
    kendo.culture("<%= culture %>");
</script>


Thanks

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 17 Sep 2014, 08:28 AM
Hi Ezequiel,

I would suggest to include all resource files needed for the cultures that your project is using and:
  • If there is no localization file for given culture you can create custom one (more info here).
  • If given culture resource file is not complete (there are messages that are not translated from English) you can edit it and add the missing translations (more info here)
Also for example of how you can dynamically change the server culture you can check the "Grid: Globalization" demo which is part of the offline examples that comes with your Telerik UI for ASP.NET MVC installation:
Regards,
Vladimir Iliev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ezequiel
Top achievements
Rank 2
answered on 17 Sep 2014, 02:46 PM
in our header we have this, as stated before:
<% var culture = System.Threading.Thread.CurrentThread.CurrentCulture.ToString(); %>
 
<script src="<%= this.ResolveUrl("~/Scripts/kendo/2014.2.903/cultures/kendo.culture." + culture + ".min.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
    kendo.culture("<%= culture %>");
</script>
below is the source generated:
<script src="/TestServer/Scripts/kendo/2014.2.716/cultures/kendo.culture.pt-BR.min.js" type="text/javascript"></script>
 
<script type="text/javascript">
    kendo.culture("pt-BR");
</script>
and attached is a print screen of generated Kendo Grid...

attached also I uploaded the solution screenshot, showing the file added in our solution...
0
Vladimir Iliev
Telerik team
answered on 18 Sep 2014, 06:27 AM
Hi Ezequiel,

It seems that there is some misunderstanding about what the "kendo.culture.pt-BR.min.js" script contains - these scripts contains only the date and numeric formats for the culture. The localizations of the widgets on other hand are contained in the satellite assemblies ("Kendo.Mvc.resources.dll") and if given satellite assembly is not found during compilation of the project (or is different version than the Kendo.Mvc.dll), the widgets will be loaded using their default English messages. That why I would suggest to carefully go trough the linked help articles from my previous reply and make sure the project is correctly configured.
For convenience I also created small example which works as expected on our side with multiple cultures (including "pt-BR") and attached it to the current thread.

Regards,
Vladimir Iliev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Ezequiel
Top achievements
Rank 2
Answers by
Vladimir Iliev
Telerik team
Ezequiel
Top achievements
Rank 2
Share this question
or