.NET Tutorial

Running the Program

Now that you have externalized all the display text from the application and internationalized all of the locale-sensitive methods, let's see how the program runs.

  1. First, we are going to use Globalyzer's Pseudo-Localization feature to create a pseudo-localized version of our MyResources.resx resource file. Pseudo-Localization allows us see our internationalization work in action, by:

    • Displaying strings from a different Locale's resource file.
    • Extending the length of strings to test dynamic layout issues.
    • Testing that the application can display non-English characters.
    • Finding missed embedded strings (these won't be pseudo-localized).
  2. Select Fix Code=>Resources=>Pseudo-Localization from the Menu Bar.

  3. In the Start and End fields, we're going to add a couple of Chinese characters:

    你好

    Globalyzer will surround each resource file string with these two characters.

  4. The Resource File field is already set to MyResources.resx. Use the Locale... button to change the Pseudo-Localizeation Locale field to English (United Kingdom) which is going to be our pseudo-locale. Select Ok Note that the Pseudo-Localization file name has changed to MyResources_en_GB_Pseudo.resx.

  5. Click Apply to generate the pseudo-localized resource file.

    Now, when we change our browser to UK English, we should see the strings from this resource file, with the Chinese characters.

  6. To run the application, you'll need to make sure your simple directory is under Inetpub\wwwroot.

  7. Open the simple.sln solution file in Visual Studio .NET and add MyResources.resx to the project via Project=>Add Existing Item. Do the same for MyResources.en-GB.resx. If you don't see your .resx files in the simple directory, make sure your file filter is set to all files.

  8. Compile the program.

  9. Browse to simple.aspx either in your browser or by right-clicking on the file in your solution explorer in Visual Studio and selecting View in Browser. Note the format of the timestamp in the main page.

  10. Now change your language settings in your browser to UK English (en-GB):

    • In Internet Explorer, select Tools=>Internet Options=>Languages. If English (United Kingdom) isn't already in the list, add it via the Add button. Then move it to the top of the list and save.

    • In Firefox, select Tools=>Options=>Content and click on the Language's Choose button. If English/(United Kingdom) isn't already in the list, add it via the Select language to add dropdown. Then move it to the top of the list and save.

    • In Chrome, select Customize=>Settings and click on the option to Show advanced settings.... Find Languages and select Languages and input settings... Click Add and select English (United Kingdom). Select Display Google Chrome in this language then restart your browser.

      Note: Chrome has previously had issues utilizing the pseudo-localized translation. If the pseudo-localization is not displayed, you may wish to try another browser.

  11. Browse again to simple.aspx and you should see the UK English version of the page displayed, with the pseudo-localized strings and altered timestamp format.

    Click the Submit and then the OK buttons to see pseudo-localized versions of the JavaScript alert and the list of books in simpleSuccess.aspx.

Congratulations! You have internationalized a .NET web application.