Localize ASP.NET MVC Dashboard Extension
- 3 minutes to read
You can localize your applications - update their UI to match certain culture and language settings:
- Translate UI element captions to a different language: dialog boxes, buttons, menu items, error messages, and so on (localization).
- Format numbers, dates, and currencies according to specific culture settings (globalization).
Localize UI
Satellite Resource Assemblies
DevExpress provides satellite resource assemblies for a variety of languages and cultures.
The DevExpress .NET Products installer registers assemblies for several cultures (German, Spanish, and Japanese) into the GAC, and also places them in the installation folder (the default path is C:\Program Files\DevExpress 24.1\Components\Bin\Framework\
). You can find these assemblies in the following subfolders:
Subfolder name | Culture |
---|---|
de | German |
es | Spanish |
ja | Japanese |
To download satellite assemblies for other cultures, use the DevExpress Localization Service. This service allows you to modify existing translations, and compile and download satellite assemblies.
Modules to translate:
- Dashboard.Core
- Dashboard.Web
- DataAccess
- Web.Resources
After you get the translations, follow the steps below:
- Copy the folder that contains satellite assemblies (for example, “es”) to the application’s bin folder.
- Set a culture for the application. You can use declarative or programmatic approaches. See the following topic for a code example: Localize ASP.NET Controls using Satellite Resource Assemblies.
UI Localization Client
The UI Localization Client is a cross-platform utility that allows you to quickly identify non-translated strings of DevExpress UI controls and translate them during a debug session. The utility automatically generates a RESX file(s) with translated resources and adds it to the project. Note that the UI Localization Client loads all Web Dashboard resource strings at once, without reflecting your interaction with the UI.
For more information refer to the following topic: UI Localization Client.
The resource strings for the Web Dashboard Control are located in the following localization containers:
- DevExpress.DashboardWeb.Localization.LocalizationContainer
- Contains localization strings specific only to the Web Dashboard Control.
- DevExpress.Utils.Localization.CoreLibraryResources
- Contains cross-platform localization strings used in the Web Dashboard Control.
- DevExpress.Web.Resources.Localization.LocalizationContainer
- Contains localization strings common to DevExpress Web Components used in the Web Dashboard Control.
Troubleshooting
If you followed the instructions in the UI Localization Client topic and translated resources do not appear on your web page, try clearing browser cache.
Localize Dates, Numbers, and Currencies
You can use Globalize to format dates, numbers, and currencies:
- Automatic script registration: Globalize is included when you register third-party libraries.
- Manual script registration: reference Globalize scripts on the web page.
Identify Non-Translated Strings
- Use our UI Localization Client tool shipped as part of your DevExpress subscription. This tool streamlines the entire localization process. You can quickly find non-translated strings and translate them during a debug session.
- Handle the XtraLocalizer.QueryLocalizedStringNonTranslated event to collect non-localized resource strings for further translation. The event allows you to focus on strings that require translation in your application.