Applications built with Iron Speed Designer contain a variety of data validation, information, and error messages that are automatically included in your application. The error message and validation message strings displayed by your application are contained in:
The base class library.
( ...\<Iron Speed Designer>\BaseClasses\Bin\ )
The application resource library.
( ...\<Iron Speed Designer>\ProjectTemplates\Resources\ )
These libraries contain translation resources for a number of cultures and languages. In addition you may change these messages to conform to the language and format of your choice. They are physically contained in two separate resource files (RESX), which are copied to your application. The files that are copied are considered part of your application and should be included when you move your application into production. Messages are retrieved from the files by your application at run-time. The files are:
BaseClasses.<UI Culture>.resx. These system messages are primarily used for non-application specific messages in applications. Examples include bad input data format and concurrency handling messages.
ProjectTemplate.<UI Culture>.resx. These application messages are used by your application for displaying data validation errors and for other application-level uses.
<UI Culture> is the valid ISO culture name, e.g.:
MyApp1.en-US.resx
MyApp1.de-DE.resx
MyApp1.it-IT.resx
When you create an application or select a new culture, Iron Speed Designer selects a file from the base class library and places it into your application’s project folder:
...\<App Name>\bin\BaseClasses.<Culture>.resx
The actual file names depend on your application’s chosen locales, e.g.:
...\<App Name>\bin\BaseClasses.es-PA.resx
...\<App Name>\bin\BaseClasses.en-US.resx
You can edit these text strings directly. We recommend using the Visual Studio XML editor. (Note: You should never modify files in the Base Classes library (folders) directly, since these files are automatically upgraded by Iron Speed Designer when installing new versions.)
When you create an application or select a new culture, Iron Speed Designer selects a file from the application resource library and places it into your application’s project folder:
...\<App Name>\bin\<App Name>.<UI Culture>.resx
The actual file names depend on your application’s chosen locales, e.g.:
...\<App Name>\bin\<App Name>.es-PA.resx
...\<App Name>\bin\<App Name>.en-US.resx
You can edit these text strings directly. We recommend using the Visual Studio XML editor. (Note: You should never modify files in the application resource library (folders) directly, since these files are automatically upgraded by Iron Speed Designer when installing new versions.)
In some cases, your resource file or specific resource strings in the resource file may not be used at application run-time. When the .NET Framework is unable to locate your resource files or a particular resource string within a resource file, it uses the resource name by default because it does not have any other information. This can occur for a variety of reasons, including:
The application is not configured for the proper language. If there is a mismatch between the culture setting in your application’s pages and the resource file you want to use, then the resource file will be ignored.
The application resource file is not contained in the Bin directory of the application. You may also need to copy the resource file into the application’s Bin directory or let Iron Speed Designer copy it to the Bin directory during Build time.
Step 1: Use the Application Wizard to add multiple languages for your application. This creates a resource file (RESX) for each selected language in your application’s App_GlobalResources folder, e.g.:
AcmeOMS.de.resx
AcmeOMS.en-US.resx
AcmeOMS.fr.resx
AcmeOMS.it.resx
AcmeOMS.resx
Step 2: In your application’s App_GlobalResources folder, open each resource file and add resource entries for the column headings, e.g.:
Resource Key |
Value |
Txt:Customer |
Customer |
Txt:OrderID |
Order Number |
The Resource Keys should be the same, regardless of language. However, the string values should be language specific.
Step 3: In Iron Speed Designer, open the page that will use these column heading strings. Then navigate to the table panel containing the column headings.
Step 4: In Design Mode, select the label control you wish to have a language-specific text string.
Step 5: In the Property Sheet, change the Text property to use the resource key you entered in your application’s resource files.
Group |
Property |
Value |
Appearance |
Text |
{Txt:Customer} |
Be sure to enclose the resource key in curly braces. This instructs Iron Speed Designer to emit code that retrieves the string from the resource file.
Step 6: Build and run your application.
Step 7: In your application, select the appropriate language from the Upper Tool Bar and your page will update to display the correct language-specific labels.
Localizing (Internationalizing) Your Application
Enabling Language Support in Microsoft Windows
Customizing Error and Validation Message Strings