Share via


Managing Files in an International Application

The Project Manager can help you organize an international application. In a project you can integrate the parts of an application, such as forms, menus, programs, and reports. The project ensures that the parts are current when you build the application for its target market.

Unlike .dbf files, text files such as query and program files don't have code page marks. This means that you must keep track of the code pages used by text files so that you can use the files properly. With the Project Manager, you can track the code pages used by text files.

Distributing Locale-Specific Run-Time Files

If you're distributing your application along with the run-time version of Visual FoxPro, you might need to include a locale-specific resource file. This file contains the dialog boxes and other user-interface elements that Visual FoxPro uses to interact with the user. There is a different run-time resource file for each language in which Visual FoxPro is available.

You would normally need to concern yourself about a locale-specific run-time resource only if all of the following are true:

  • You are including the run-time version of Visual FoxPro with your application.
  • You are distributing your application to users who use a language different from the one in which you developed it. For example, if you develop in English for an English-speaking user base, you don't need to worry about including a locale-specific resource file. However, if you use the English version of Visual FoxPro to develop but are distributing your run-time application in a French-speaking country, you should consider including the run-time resource file.
  • Your application displays Visual FoxPro dialog boxes, menus, or error messages. Typically, if you've designed and localized your own versions of these interface elements, you don't need to include the locate-specific resource file.

Run-time resource files are named using the format Vfp8aaa.dll, where "8" is the version number and "aaa" is a three-letter code representing the language. For example, the code ENU stands for United States English, the code DEU stands for German, and the code FRA for French. The run-time resource files for these languages are therefore Vfp8renu.dll, Vfp8rdeu.dll, and Vfp8rfra.dll, respectively.

You must always include at least one run-time resource file, even if you don't intend to use any of the user interface elements in Visual FoxPro as part of your application. By default, Visual FoxPro includes the resource file that's provided with your copy of the program. For example, if you're developing an application using the United States version of Visual FoxPro, Visual FoxPro automatically includes Vfp8renu.dll if you include run-time files with your application. If you have no reason to use a locale-specific resource file, you can simply distribute the default resource file as part of your application.

When the application is installed, users can specify the run-time resource file to use by making an entry in the Windows system registry or by using a command-line switch.

To specify a run-time resource file

  • In the command line that starts your application, include the L switch and the name of the resource file that you want to use (including a path if necessary). Do not put a space between the switch and the file name.

    For example, the following command specifies the file Vfp8rdeu.dll as the resource file:

    C:\Program Files\Microsoft Visual ;
    FoxPro\MYAPP.EXE -LC:\Myapp\Vfp8rdeu.dll
    

    -or-

  • Set the Windows registry on the user's machine (using code or an application such as Regedit.exe) to point to the resource file to use. The registry entry containing the name of the run-time resource file is:

    HKEY_CLASSES_ROOT\VisualFoxProRuntime.<current version number>\Resources

    For example, the following registry entry points to the run-time resource file vfprdeu.dll:

    HKEY_CLASSES_ROOT\VisualFoxproRuntime.8\Resources
    C:\Program Files\Common Files\Microsoft Shared\VFP\vfprdeu.dll

    If you want to control the resource file used by the full development version of Visual FoxPro, use a similar registry key without the run-time reference:

    HKEY_CLASSES_ROOT\VisualFoxpro.<current version number>\Resources

    For example, the following registry entry points to the resource file on a computer with the full version of Visual FoxPro installed:

    HKEY_CLASSES_ROOT\VisualFoxpro.8\Resources
    C:\Program Files\Visual FoxPro 8\vfpdeu.dll

When the run-time application starts, Visual FoxPro searches for a resource file, first according to the L switch and then according to the Registry setting. If neither of these settings specifies a locale-specific resource file, Visual FoxPro uses the current system (Windows) locale to dynamically construct a DLL file name. Therefore, if the locale-specific resource file for your application matches the system locale on the user's version of Windows, you don't need to explicitly specify the resource file name. However, it's always safest not to rely on the system default if you want to be sure that the proper file is loaded.

See Also

Creating or Modifying Programs | Specifying the Code Page of a Text File | Application Distribution Process | Developing International Applications | Application Creation with Double-Byte Character Sets | Sorting Data in International Applications