Localization

Localization is the process of adapting software to meet the requirements of local markets and different languages.

Setting the Current Language

The culture that is used for the localization messages in Telerik UI for ASP.NET MVC is determined by the CurrentUICulture, not by the CurrentCulture property. By default, if CurrentUICulture is not supported, the Telerik UI for ASP.NET MVC helpers will display their messages in American English (en-US). If CurrentUICulture is set from code or from the web.config file, Telerik UI for ASP.NET MVC will use localized user interface messages.

The following table lists the localized messages for the cultures which are supported by Telerik UI for ASP.NET MVC.

Culture Language Country
bg-BG Bulgarian Bulgaria
da-DK Danish Denmark
de-DE German Germany
es-ES Spanish Spain
en-US English United States of America
fr-FR French France
nl-NL Dutch The Netherlands
pl-PL Polish Poland
pt-PT Portuguese Portugal
pt-BR Portuguese Brazil
ro-RO Romanian Romania
ru-RU Russian Russia
sv-SE Swedish Sweden
uk-UA Ukrainian Ukraine
zh-CN Chinese People's Republic of China

Customizing the Localized Messages

Telerik UI for ASP.NET MVC uses satellite assemblies to support localization (user interface messages localized for a set of cultures). To change the provided localization messages, you have to build a custom Kendo.Mvc.dll version because Kendo.Mvc.dll is a strongly named assembly and its private key is not shipped as part of the distribution.

To update the provided localization messages in Telerik UI for ASP.NET MVC:

  1. Open the \src\Kendo.Mvc\Kendo.Mvc.csproj Visual Studio project. The \src directory is available only with the commercial version of Telerik UI for ASP.NET MVC.
  2. Locate the Resources directory in the solution explorer. It contains the resource files for the supported cultures.

    Resources

  3. Open the resource file which corresponds to the target culture, for example, Messages.es-ES.resx.

  4. Edit the resource file and save it.
  5. Change the solution configuration to Release.
  6. Build the project.
  7. Copy \src\Kendo.Mvc\bin\Release\Kendo.Mvc.dll and \src\Kendo.Mvc\bin\Release\es-ES\Kendo.Mvc.resources.dll to your ASP.NET MVC application.
  8. Update the Kendo.Mvc.dll assembly reference to the newly copied one.

Apart from building a custom version of Kendo.Mvc.dll, you can also specify a new value for the corresponding message in the MVC HtmlHelper configuration.

The following example demonstrates how to change the default message for the Create toolbar command of the Grid.


    <%:Html.Kendo().Grid<Product>()
           .Toolbar(toolbar =>
           {
               toolbar.Create().Text("Add new product");
           })
    %>

    @(Html.Kendo().Grid<Product>()
          .Toolbar(toolbar =>
          {
            toolbar.Create().Text("Add new product");
          })
    )

Creating New Localization Files

To add a localization file for a new language, you have to build a custom Kendo.Mvc.dll version because Kendo.Mvc.dll is a strongly named assembly and its private key is not shipped as part of the distribution.

To add new localization files in Telerik UI for ASP.NET MVC:

  1. Open the \src\Kendo.Mvc\Kendo.Mvc.csproj Visual Studio project. The \src directory is available only with the commercial version of Telerik UI for ASP.NET MVC.
  2. Locate the Resources directory in the solution explorer. It contains the resource files for the supported cultures.

    Resources

  3. Copy Messages.resx and paste it. Rename the copy to Messages.culture-code.resx, for example, Messages.es-MX.resx.

  4. Open the newly created resource file.
  5. Edit the resource file and save it. The Messagex.resx file contains the English messages.
  6. Change the solution configuration to Release.
  7. Build the project.
  8. Copy \src\Kendo.Mvc\bin\Release\Kendo.Mvc.dll and \src\Kendo.Mvc\bin\Release\es-MX\Kendo.Mvc.resources.dll to your ASP.NET MVC application.
  9. Update the Kendo.Mvc.dll assembly reference to the newly copied one.

Contribution

Currently, translations are not available for every language and some of the localization files may be incomplete. The full list of currently available translations is available in the Kendo UI Core repository.

If you notice any missing messages in the localization files or would like to add localization files for your language, do not hesitate to:

  1. Fork the repository.
  2. Apply the respective changes.
  3. Submit a pull request.

See Also

In this article
Not finding the help you need? Improve this article