Share via


Visual Basic Concepts

Designing an International-Aware User Interface

Because text tends to grow when you localize an application, you should pay special attention when designing the following user interface (UI) components:

  • Messages

  • Menus and dialog boxes

  • Icons and bitmaps

  • Access and shortcut keys

Messages

English text strings are usually shorter than localized text strings in other languages. The following table shows the additional average growth for strings, based on initial length. This data is drawn from past Visual Basic localization projects and describes an average growth rate.

English length (in characters) Additional growth for localized strings
1 to 4 100%
5 to 10 80%
11 to 20 60%
21 to 30 40%
31 to 50 20%
Over 50 10%

When designing the interface, consider these growth ratios and allow for text to wrap to more lines as the messages get longer.

As with messages, menus and dialog boxes may grow when the application is localized. Consider the two following identical dialog boxes in the Automated Teller Machine sample application. You can see that extra space was allocated in the dialog box to allow for text expansion. Figure 16.2 shows the English dialog box, while Figure 16.3 shows the Spanish dialog box. Knowing that text can grow, plan your interface so that controls don't have to be resized or other elements redesigned when localized.

Figure 16.2   English input dialog box in the ATM sample application

Figure 16.3   Spanish input dialog box in the ATM sample application

In menus and dialog boxes, avoid crowding status bars. Even abbreviations might be longer or simply not exist in other languages.

Icons and Bitmaps

Icons and bitmaps are usually used to depict a certain functionality without using text. Consider the following rules when working with icons and bitmaps:

  • Avoid using bitmaps that are not an international standard. The following bitmaps represent a mailbox in the United States, but many users from other locales will not recognize it.

  • Avoid using bitmaps that contain text. They take time to redraw, and text growth might also become an obstacle, as illustrated in the following icons.

  • Make sure that bitmaps or icons are culturally sensitive. What may be acceptable in one locale may be inappropriate or offensive in another.

Access and Shortcut Keys

Different locales have different keyboard layouts. Not all characters exist in all keyboard layouts. When developing your Visual Basic application, make sure all access-key and shortcut-key combinations you assign can be reproduced with international keyboards. One simple method to verify that your keyboard assignments work properly for the locales you are targeting is to choose the desired keyboard layout from your Windows Control Panel, along with keyboard layout pictures (which some reference manuals contain), and try the access-key and shortcut-key combinations.

Because certain access-key and shortcut-key combinations are not available for certain locales or because they are reserved for system use by some editions of Windows, it is best to avoid them when developing your Visual Basic application. Here are some examples of characters to avoid:

@ $ { } [ ] \ ~ | ^ ' < >

One way to work around this limitation is to use numbers and function keys (F1, F2, etc.) instead of letters in shortcut-key combinations. These may be less intuitive but they will not require any localization, because virtually all keyboard layouts include numbers and function keys.

Note   DBCS characters cannot be used as access or shortcut keys.