Web Forms: Localizing Applications

MM .NET makes it easy for end users to add new languages and localize the applications themselves without assistance from developers. Users can add new languages and translate the entire application including text such as labels, buttons, and system messages. This section describes how to perform these localizations.

Putting the Application in Localize Setup Mode

To put a Web Forms application in Localize Setup mode so that it can be localized, navigate to the Default.aspx page found in your application's Admin folder. For example:

Navigating to this URL displays the Application Administration page. Click the Show Translation Buttons link to put the application in Localize Setup mode:

Now when you navigate to pages in your web application, a Translation Setup icon and link are displayed on each page (NOTE: You may have to press F5 after navigating to a page before the icon and link are visible) :

If you still don't see the icon and link after pressing F5, you may have to resize the form to see them.

Localizing Forms

To localize your application's web forms, follow these steps:

  1. Navigate to the form to be localized and click the Translation Setup link. This displays the Language Administration form:

    The Localizable Text list box displays all the unique text of the form to be localized including the form caption, label text, and button text. The Languages drop down list displays a list of all languages in the Language table. The Translated Text box displays the translated text for the currently selected item and language. If no translation has been performed for the currently selected language, the Translated Text box contains the same value as the Localizable Text list box.

    Notice all separator characters (colons, by default) are removed from labels before they are displayed in the Original Text list box. This prevents users from having to localize redundant text whose only difference is a trailing colon. For example, if a label's text is set to "Last Name:", and there is also a grid with the header text "Last Name" you only have to translate this phrase once.

  2. To translate text, select the text to be translated in the Localizable Text list box, and select the language you want to translate to in the Languages drop down list. If the text has not been previously translated, the Translated Text box contains the same value as the Localizable Text list box. To localize the text, enter the corresponding phrase in the Translated Text box.

    For example, if you want to translate the English word "Country" to German:

    • Select the word "Country" in the Localizable Text list box.

    • Select German in the Languages drop down list.

    • Change the text in the Translated box to "Land"

  3. To save the translated text, click the Save Translation button.

If you click the Close Form link it closes the Language Administration form and takes you back to the form you were localizing. If you click the Admin Form link, it displays the Default.aspx Web Administration form in the same window as the Language Administration form. If you select the Show System Messages check box you can edit application messages as described in the next section.

Localizing Application Messages

At times there is text in your Web Forms application that is not easily translated. For example, you may have text that is displayed conditionally. Rather than forcing a translator to discover all text displayed under different conditions, you can choose to put code in your application's Message table for easier translation.

When you run the mmLocalize.sql script (Step 1: Adding Localization Tables to a Database) it automatically adds all MM .NET messages to the Message table. You can also add your own application-specific messages to this table for display and localization.

To localize application messages, follow these steps:

  1. Navigate to your application's Admin\Default.aspx page as described previously

  2. Click the System Message Translation link:

    This displays the Language Administration form:

    The Localizable Text list box displays all MM .NET message text as well as any application-specific message text you add to the Messages table. This is the same Language Administration form discussed in the previous section and is used in the same way to translate application messages.

Changing the Current Application Language

If you allow anonymous users to access your web site (users that don't log in), you may want to offer the ability to allow users to specify the language they want to use while viewing your site. To do this, you can drop an mmLanguageChooser control on a form.

At run time, this control displays a list of all languages in your application's Language table. For example:

When users select a language from this drop down list, it sets a session variable (mmCurrentLanguage) specifying the current user's language, and immediately displays the form in the specified language.


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/26/18
Comment or report problem with topic