The purpose of this document is to provide guidance and information needed to create local language versions of OpenDCL.
OpenDCL uses resource DLLs for localizable resources. This allows OpenDCL to be installed with multiple languages by placing the resource DLL for each language in a different subdirectory named for the language. A registry key identifies the language to use at runtime. The default language is US English, with resources in a subdirectory named "ENU". The OpenDCL project contains separate sets of local resource DLLs for the OpenDCL Runtime and for OpenDCL Studio, both using the same localization strategy.
Each local language translation project will be managed by a local language project manager. Local language project managers will be responsible for communication changes to the main OpenDCL project. Currently, this should be done via email to Owen Wengerd at owenw@manusoft.com. As the project progresses, the procedures for keeping files synchronized will change. The goal is to eventually utilize the SVN source code management system on SourceForge to streamline this process.
Download US English source files here:
OpenDCL.ENU.zip [1.2MB, uploaded 2024-09-22]
Download current work-in-progress localized files here:
OpenDCL.CHS.zip [1.2MB, uploaded 2024-09-22]
OpenDCL.DEU.zip [1.3MB, uploaded 2024-09-22]
OpenDCL.ESM.zip [1.2MB, uploaded 2024-09-22]
OpenDCL.FRA.zip [1.2MB, uploaded 2024-09-22]
OpenDCL.RUS.zip [1.4MB, uploaded 2024-09-22]
The primary localizable source code files will be plain text files called resource script files (*.rc). Resource script files are used directly by the build system to create the resource DLLs. These files can be edited with Windows NotePad or other text editors. Since resource script files are used directly by the OpenDCL build system, they must follow proper formatting and syntax rules. The basic format can be easily seen simply by opening an .rc file in a text editor. Each resource in the file is identified by a "resource ID". By convention, the resource ID consists of all capital letters.
A typical localization task is to translate a string resource. String resources are found in the string table, which has a section header that looks like this:
///////////////////////////////////////////////////////////////////////////// // // String Table //
The string table section header is followed by multiple string table entries (with up to 16 strings in each entry) that look like this:
STRINGTABLE BEGIN IDS_TRUE "True" IDS_FALSE "False" END
Only the quoted strings should be translated. The resource symbols (IDS_TRUE and IDS_FALSE in this sample) must *not* be changed, or the resource script will fail to compile. After translation, this section should look like this:
STRINGTABLE BEGIN IDS_TRUE "Vrai" IDS_FALSE "Faux" END
Quoted strings in a resource script file must not be longer than 254 characters. If your translated string exceeds 254 characters, then you must either modify the translation to make it shorter, or request changes in the code that uses the string so that it can be split into multiple strings.
Some resource strings include replaceable parameters (such as %s or %d). These replaceable parameters will be replaced at runtime. If a string contains replaceable parameters, then your translated string must contain the same replaceable parameters in the same order or the code will crash at runtime.
It is generally desirable, but not required, to keep event names in English. The localized event name is used to create the default name for the handler function in AutoLISP. By keeping event names in English, all AutoLISP code consistently uses English words for both events and properties. Event names are defined in SharedRes.*.rc with IDs of the form IDS_EVENT_*.
Once a first draft of your translation is completed, the translated files should be added to the project and tested to ensure that they build without error and that the resulting resource DLL is properly integrated into the software installation script. Corrections and improvements may then be made and incorporated into new builds of OpenDCL.
The first translation task is to create a localized resource file for OpenDCL Runtime. Two files must be translated:
The second phase is to translate property and method descriptions used in OpenDCL Studio. The following files must be translated:
The third phase consists of translating all other localizable resources for OpenDCL Studio. All localizable resources are in the Studio.XXX.rc file. The string resources must be translated, as well as menus and dialog boxes.