Selecting Your Language
This section will use the symbol ** to represent the name of the language you are selecting.
First, you need to determine if your language is currently supported. The best way to do that is to open the file in your pkg folder named LanguageText.pkg. The top of the file will list all supported languages and should contain something like the following:
Enumeration_list
define Language$English
define Language$Nederlands
define Language$Svenska
define Language$Deutsch
define Language$Dansk
define Language$Portugues
define Language$Francais
define Language$Italiano
define Language$Espanol
define Language$Norsk
Define Language$Russian
Define Language$Polish
Define Language$Hungarian
End_Enumeration_List
If your language is not supported, you need to go to the next section, add the language, then come back here.
If your language is supported, you should have a set of files in subfolders in a folder created for your language. We will refer to that as your “language folder”. Those files are located in usr\language\**. You will need to copy files from this folder into various other folders where the current version of DataFlex is installed. We will refer to the folder where the current version of DataFlex is installed as your “DataFlex folder” and any reference to DataFlex\FolderName is a reference to FolderName beneath the DataFlex folder.
Steps to Perform on All Systems Running DataFlex
The following steps must be performed on any system running your application, for development and runtime use.
Run the Correct Regional Version of Windows
Some of the text provided in your application comes from Windows. The message boxes (used for errors, confirmations, etc.), the open file dialogs, and much more get their language text from Windows. When you run your application, you will want to run it on the proper version of Windows or your translation will be mixed.
Installing Your Error Tables
-
First, make sure you copy all error tables in your
DataFlex\usrfolder to some other safe location. Copyflexerrs.datanddferr???.dat. -
Copy all error tables from the language folder into your
DataFlex\usrfolder. Copyflexerrs.datanddferr???.dat. -
If you are not using a custom version of
flexerrs, you are done. -
If you are using a custom version of
flexerrs, you are going to need to make sure that your custom errors are properly merged into the translated table. Some developers maintain a single customizedflexerrsinDataFlex\usrwhile others may maintain customflexerrsin each workspace. If you have customized error tables, you must make sure they are up to date.
Installing Your Collate File
If your language requires a special df_collate.cfg, you will want to install this into your DataFlex\bin folder and then re-sort all your databases.
-
Make sure you have copied the current
df_collate.cfginDataFlex\binto a safe location. -
Copy the
df_collate.cfgfrom yourlanguage\binfolder to theDataFlex\binfolder. You must make sure that this file resides in yourDataFlex\binfolder and that no copies of it exist in any other path that can be found withdfpath. -
Resort all database tables.
Any time you install a new df_collate.cfg you will need to re-sort all your tables. These tables can be sorted from Database Builder.
Note: Earlier versions of DataFlex used a file named collate.cfg. The proper file name is now df_collate.cfg.
Installing Your WinPrintViewer.ini File
If your application uses WinPrint reports, you will want to install the translated WinPrintViewer_.ini file into your DataFlex\bin folder as WinPrintViewer.ini. This file controls the text of controls in the WinPrint viewer.
-
Make sure you have copied the current
WinPrintViewer.iniinDataFlex\binto a safe location. -
Copy the
WinPrintViewer_.inifrom yourlanguage\binfolder to theDataFlex\binfolder and rename it toWinPrintViewer.ini.
Steps to Perform on Development Systems
The following steps must be performed on your development PC. This ensures that your compiled application will contain text in the appropriate language.
Installing Your Text Language Files
- Your language folder should contain a number of
.incand.pkgfiles in the\pkgfolder that need to be copied to yourDataFlex\pkgfolder. These all have unique names so you should not have to worry about copying over files from a different language. These files may already be copied into yourDataFlex\pkgfolder. If they are not, copy them.
List of files to install into your DataFlex\pkg folder for all DataFlex applications:
Language_**.incLanguage_DD_**.inc
List of files to install into your DataFlex\pkg folder for DataFlex Web applications:
Language_WebApp_***.inc
List of files to install into your DataFlex\pkg folder for DataFlex Windows applications using WinPrint reports:
Language_Winprint_**.inc
List of files to install into your DataFlex\pkg folder for DataFlex Windows applications using legacy menus (menus that do not use Codejock classes):
DefaultToolbar_**.pkgDfStdBtn_**.pkgFile_pm_**.incHelp_pm_**.incHelpa_pm_**.incNavi_pm_**.inc-
Win_pm_**.inc -
Your language folder should contain a number of template (
.tpl) files in the\pkg\configfolder that need to be copied to yourDataFlex\pkg\configfolder. These all have unique names so you should not have to worry about copying over files from a different language. These files may already be copied into yourDataFlex\pkg\configfolder. If they are not, copy them.
List of files to install into your DataFlex\pkg\config folder for DataFlex Windows applications:
DefaultCommandBarSystem.tplTestWindowsProject.tplWindowsProject.tpl
List of files to install into your DataFlex\pkg\config folder for DataFlex Windows applications using legacy menus (menus that do not use Codejock classes):
TestWindowsProjectOldMenus.tpl-
WindowsProjectOldMenus.tpl -
The file
Language_Current.incdefines which language you are currently using. This file is located in theDataFlex\pkgfolder and can be loaded in the Studio and changed. Simply change the define command to use your language. This is whatLanguage_Current.incmight look like:
// define current language. Included by LanguageText.pkg or LanguageTextWebApp.pkg
// (see LanguageText.pkg for a list of supported languages).
Define Language$Current for
Language$Nederlands
#Include Language_English.inc
- Pre-compile all packages.
A Note on the Text Translation Files
The files Language_.inc, Language_Winprint_.inc, and Language_DD_.inc contain a list of all text used by our packages. Our packages now use text symbols (e.g., C_$Cancel) instead of text (e.g., “Cancel”). These include files provide the translation (e.g., #REPLACE C_$Cancel |CS"Cancel"). This makes it easy to provide text for various languages.
When you write your programs, we do not expect that you will need to use these kinds of symbols in your application. You would only need to do that if you are writing an application or sets of packages that need to be multi-lingual. Therefore, you will not need to change the way you are writing your applications.
You are now done.