Edit this page

Localization

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

Defaults

If the CurrentUICulture is set—from code or web.config—Progress Telerik UI for ASP.NET MVC will use localized user interface messages.

Telerik UI for ASP.NET MVC comes with localized messages for the cultures listed in the table below.

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

If the CurrentUICulture is not supported, the default en-US will be used.

Important

The culture used for the localization messages is determined by the CurrentUICulture and not by the CurrentCulture property.

Configuration

Change Localization 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, a custom version of Kendo.Mvc.dll must be built. This is required because Kendo.Mvc.dll is a strongly named assembly and its private key is not shipped as part of the Telerik UI for ASP.NET MVC distribution.

Below are listed the steps for you to follow when willing to change the provided localization messages.

  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.

    Figure 1. The Resources directory when changing localization messages

    Resources

  3. Open the resource file which corresponds to the target culture, e.g. 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 specify a new value for the corresponding message in the MVC HtmlHelper configuration. For example, change the default message for the create Grid toolbar command as demonstrated below.

Example

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

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

Add New Localizations

To add a localization for a new language, a custom version of Kendo.Mvc.dll must be built. This is required because Kendo.Mvc.dll is a strongly named assembly and its private key is not shipped as part of the Telerik UI for ASP.NET MVC distribution.

Below are listed the steps for you to follow when you want to add new localizations.

  1. Open the \src\Kendo.Mvc\Kendo.Mvc.csproj Visual Studio project. The \src directory is available only with the commercial version of Progress Telerik UI for ASP.NET MVC.

  2. Locate the Resources directory in the solution explorer. It contains the resource files for the supported cultures.

    Figure 2. The Resources directory when adding new cultures

    Resources

  3. Copy Messages.resx and paste it. Rename the copy to Messages.culture-code.resx, e.g. 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.

See Also