The Target File Names dialog box (see figure below) lets you define a rule specifying a target path and a target file name to be used for all of the project's target files (of a certain type) or for the current target file only.
Open this dialog by clicking on the Target file names button at the bottom of the Target Files page (Source and Target Files dialog box).
The path and name of a target file may depend on your specific project and must usually follow the rules of the software development platform with which the software project (source files) were created. For example, the target file path and name of a .NET assembly DLL follows (according to the development platform) different rules than the properties files of a Sun Java project:
.NET EXE file (Chinese Traditional target language)
Source file: C:\MyProject\MyAppl.exe
Target file: C:\MyProject\zh-tw\MyAppl.resources.dll
Java properties file (Chinese Traditional target language)
Source file: C:\MyProject\MyAppl.properties
Target file: C:\MyProject\MyAppl_zh_TW.properties
As you can see in the examples above, a .NET target file (assembly DLL) is written to a subdirectory of the executable file where the name of the subdirectory is the locale language code (string) of the target language. The target file of a Java properties file is usually written to the same directory as the source file, and the name of a Java properties file follows the rule that the target file name is a combination of the name of the source file plus the locale language string of the target language.
Since a target file is created using specific rules for the path and file name, these rules must be definable. This can be done in the Target File Names dialog box.
NOTE – "Rules per File Type": By default, a target file rule implemented in RC-WinTrans will be defined for all the files of that particular type within a translation project. The rule can also be specified for a single target file.
Figure: The Target File Names dialog box.
The two primary fields of the Target File Names dialog box are (1) the Path edit field which defines the target path rule and (2) the File name edit field which defines the rule for the target file name. Placeholders are used (in a rule) in both of these fields to define the target path and name. A rule can also contain statically-named path names, subfolders, and/or file names.
The four available language code placeholders can be used to extend the target file name or path. The tables below describes the placeholders that can be used in the path and file name rule definitions.
RC-WinTrans can call a VBA macro each time the name of the target file is requested. For example, the target file name (and path) is requested each time RC-WinTrans creates a translated target file.
The VBA macro can be used to return the target file name and target path to be used (ignoring or modifying the defined rules). This can be useful, for example, when the options for defining the rules in the Target File Names dialog box are insufficient.