The following is an overview of the RC-WinTrans command line commands. Sample files demonstrating the use of certain commands are included with RC-WinTrans. These files can be found in the RC-WinTrans installation under "Samples" | "Commandline" | "Batch."
·
|
/AddLanguage
/AddLanguage (1. ProjectFileName) (2. LangCode)
or /a ...
DESCRIPTION:
|
Adds a new target language to a translation project.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. LangCode
Target language; the language code for the language to add.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd.exe /AddLanguage "c:\dir\mytrans.rwtproject" ja-JP /a
rwtcmd.exe /a mytrans.rwtproject "fr"
|
^ TOP ^
|
|
/AddProject [New -- January 2011]
/RemoveProject [New -- January 2011]
/AddProject (1. ProjectFileName)
or /ap ...
/RemoveProject (1. ProjectFileName)
or /rp ...
DESCRIPTION:
|
Adds/Removes a translation project.to/from the RC-WinTrans environment
(respective to/from the "Projects" tab view).
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd.exe /AddProject "c:\dir\mytrans.rwtproject"
rwtcmd.exe /ap "c:\dir\mytrans.rwtproject"
|
|
·
|
/AddSourceFile
/AddSourceFile (1. ProjectFileName) (2. SourceFileName)
or /as ...
DESCRIPTION:
|
Adds a new to the translation project.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. SourceFileName
Resource file; the full path to the to be added.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd.exe /AddSourceFile "c:\dir\mytrans.rwtproject" "c:\dir\files\app.rc"
rwtcmd.exe /as "c:\dir\mytrans.rwtproject" "c:\dir\files\strings.ini"
|
^ TOP ^
|
·
|
/AddTextToLogFile
/AddTextToLogFile (1. text)
or /ll ...
DESCRIPTION:
|
Writes text as a single line to the log file. See also the "/log" switch under "Switches" (further on).
|
PARAMETERS:
|
1. text
The string to write to the logging file. Use quotation marks if the string contains spaces.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd /AddTextToLogFile "Hello World!" /a
rwtcmd /ll "Start process from command line..."
|
^ TOP ^
|
·
|
/CheckLanguage
/HasLanguage (1. ProjectFileName) (2. LangCode)
or /l ...
DESCRIPTION:
|
Checks the existence of a specified language in the translation project.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. LangCode
The language code for the language to be checked.
|
RETURN VALUE:
|
"1" if the project contains the specified language; otherwise "0."
|
EXAMPLE:
|
rwtcmd /CheckLanguage "c:\dir\mytrans.rwtproject" it-CH
rwtcmd.exe /l "c:\dir\mytrans.rwtproject" en-US
|
^ TOP ^
|
·
|
/CreateProject
/CreateProject (1. ProjectFileName) (2. ProjectName) (3. SourceLangCode)
or /c ...
DESCRIPTION:
|
Creates a new translation project.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. ProjectName
Short name of the translation project. The name will be used/displayed in RC-WinTrans.
3. SourceLangCode
Source language; the language code for the source language of the translation project.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd.exe /CreateProject "c:\dir\mytrans.rwtproject" "My Project1" it-CH
rwtcmd.exe /c "c:\dir\mytrans.rwtproject" "My Project1" en-UK
|
^ TOP ^
|
·
|
/ExportProject
/ExportProject (1. ProjectFile) (2. TargetProjectFile) (3. SrcLang)
(4. TgtLang) (5. ProjectName- optional)
or /ep ...
DESCRIPTION:
|
Exports a translation project as database type project (.fsmdb file). One target language from the source project can be exported, even if the source project has several target languages.
Hints: This command is realized with the "ExFcts.ExportProject" RC-WinTrans COM API function.
Use the "/log" switch to write command call information to a log file.
|
PARAMETERS:
|
1. ProjectFile
File name of the source project from which data is to be exported; file extension = *.rwtproject (project definition file). The source project must be listed in RC-WinTrans' Projects tab view.
2. TargetProjectFile
File name of the target project; file extension = *.fsmdb (database file) or *rwtproject (project definition file).
3. SrcLang
The source language. Use an empty string ("") when the source language is the project's original language. To use an existing target language as the source language, use the language code of the target language.
4. TgtLang
Target language; the language code of the target language.
5. ProjectName (Optional)
A short name for the project used in RC-WinTrans' Projects tab view. This parameter is optional. When this parameter is not given the exported project will have the same name as the source project.
|
RETURN VALUE:
|
"0" when successful.
|
^ TOP ^
|
·
|
/ImportFromProject (updated: January 2012
/ImportFromProject (1. ProjectFile) (2. FromProjectFile)
(3. FromLang) (4. ToLang) (5. ImportData optional)
or /ip ...
DESCRIPTION:
|
Imports data from a translation project for a single target language.
Hints: This command is realized with the "ExFcts.ImportFromProject" RC-WinTrans COM API function.
Use the "/log" switch to write command call information to a log file.
The number of imported items is also reported to the log file.
|
PARAMETERS:
|
1. ProjectFile
File name of the project into which data is to be imported; file extension = *.rwtproject (project definition file).
2. FromProjectFile
File name of the project from which data is to be imported; file extension = *.fsmdb (database file) or *rwtproject (project definition file).
3. FromLang
The language code of the language for which data is to be imported, e.g., "en-US" for English (US) or "ja-JP" for Japanese (Japan).
4. ToLang
Target language; the language code of the target language for which data is to be imported.
5. ImportData (Optional)
A numeric value for the data type(s) to import:
Text (= 1): text.
Size (= 2): size and position.
Binary data (= 4): binary data, images.
Font (= 8): font specification.
Style (= 16): styles.
All other (= 32): all other data.
Note (= 64): notes (RC-WinTrans data).
Task (= 128): tasks (RC-WinTrans data).
Re-check (= 256): re-check marker (RC-WinTrans data).
When this optional parameter is not given the default value of "3" is used. This imports text (1) and size/position" (2) = 3.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
^ TOP ^
|
·
|
/ImportFromResourceFile
/ImportFromResourceFile (1. ProjectFileName) (2. LangCode) (3. ToResFile)
(4. FromResFile) [5. DataType] [6. ImportSameAsSource]
or /ir ...
DESCRIPTION:
|
Imports the data of a translated resource file for a corresponding file in a translation project.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. LangCode
Target language; the language code of the data.
3. ToResFile
The full path to the as contained in the translation project.
4. FromResFile
The full path to the translated resource file.
5. DataType
The data type(s) to be imported; possible values:
"ALL" = import all data.
"STRING" = import strings only.
"SIZE" = import size and position data only.
NOTE: The use of this parameter is optional. The default value is "ALL."
6. ImportSameAsSource
Import translated text data even if the text is identical to the .
Possible values:
1 = import text also if it is the same as the source text
0 = import text only if it is different to the source text
NOTE: The use of this parameter is optional. The default value is "0."
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
rwtcmd /ImportFromResourceFile "mytrans.rwtproject" en-US "files\app.rc" "files\it\appIT.rc"
rwtcmd /ir "mytrans.rwtproject" en-US "files\app.rc" "files\it\appIT.rc" SIZE /a
rwtcmd /ir "mytrans.rwtproject" en-US "files\app.exe" "files\it\app.exe" STRING 1 /a
|
^ TOP ^
|
·
|
/IsProjectUpToDate
/IsProjectUpToDate (1. ProjectFileName) (2. TargetLangCode)
or /pd ...
DESCRIPTION:
|
Verifies whether any of the in a translation project have changed when compared to the translation project (i.e., whether the files need to be updated). This check is only performed for the project file with the given target language.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. TargetLangCode
Target language; the language code for the language to be checked.
|
RETURN VALUE:
|
"1" if the translation project is up-to-date for the specified language; otherwise "0."
|
EXAMPLE:
|
rwtcmd /IsProjectUpToDate "mytrans.rwtproject" en-US /a
rwtcmd /pd "mytrans.rwtproject" ja-JP /a
|
^ TOP ^
|
·
|
/IsTranslated (updated: January 2012
/IsTranslated (1. ProjectFile) (2. TargetLangCode) (3. SourceFile optional)
or /t ...
DESCRIPTION:
|
Verifies whether a given contained in a translation project is translated for the specified language. A file is considered to be translated when a translation (target text) exists for all text items (e.g. caption, string, x-text, comboboxitem, listitem).
|
PARAMETERS:
|
1. ProjectFile
Project file; the full path to the (.rwtproject).
2. TargetLangCode
Target language; the language code for the language to be checked.
3. SourceFile (Optional)
The full path to the to be checked.
This parameter is optional and can be omitted to check the data for all files in the project (for the given target language)
|
RETURN VALUE:
|
"1" if the project is translated for the specified language; otherwise "0."
|
EXAMPLES:
rwtcmd /IsTranslated "c:\transl\mytrans.rwtproject" de-DE "c:\trans\resfile.resx" /a
rwtcmd /t "c:\transl\mytrans.rwtproject" ja-JP "c:\trans\resfile.resx" /a
rwtcmd /IsTranslated "c:\transl\mytrans.rwtproject" ja-JP /a
|
^ TOP ^
|
·
|
/IsUpToDate
/IsUpToDate (1. ProjectFileName) (2. SourceFileName) (3. TargetLangCode)
or /d ...
DESCRIPTION:
|
Checks whether a given has changed by comparing it to the translation project. This check is only performed for the project file with the given target language.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. SourceFileName
The full path to the to be checked.
3. TargetLangCode
Target language; the language code for the language to be checked.
|
RETURN VALUE:
|
"1" if the is unchanged; otherwise "0."
|
EXAMPLE:
rwtcmd /IsUpToDate "c:\transl\mytrans.rwtproject" de "c:\trans\resfile.resx /a
rwtcmd /d "mytrans.rwtproject" ja-JP "resfile.resx" /a
|
^ TOP ^
|
·
|
/Update
/Update (1. ProjectFileName) (2. SourceFileName) (3. TargetLangCode)
or /u ...
DESCRIPTION:
|
Updates the translation data of a for a given target language.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. SourceFileName
Resource file; the full path to the to be updated.
3. TargetLangCode
Target language; the language code for the language to be updated.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd /Update "c:\transl\mytrans.rwtproject" "c:\trans\resfile.resx" it-IT /a
rwtcmd /u "mytrans.rwtproject" "resfile.resx" ja-JP /a
|
^ TOP ^
|
·
|
/UpdateAll
/UpdateAll (1. ProjectFileName) (2. TargetLangCode)
or /ua ...
DESCRIPTION:
|
Updates all the translation data of the in a translation project for a given target language.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. TargetLangCode
Target language; the language code for the language to be updated.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd /UpdateAll "mytrans.rwtproject" it-IT /a
rwtcmd /ua "c\transl\mytrans.rwtproject" ja-JP /a
|
|
·
|
/WriteTargetFile
/WriteTargetFile (1. ProjectFileName) (2. SourceFileName) (3. TargetLangCode)
(4. TargetFileName) [5. Encoding]
or /wt ...
DESCRIPTION:
|
Writes a in a specified language with the optional use of a given encoding (e.g., "default," "UTF-8," or "UTF-16" for Java properties files). Note that if the "TargetFileName" parameter is passed as an empty string (""), the target file rule designated for the will be used.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. SourceFileName
Resource file; the full path to the .
3. TargetLangCode
Target language; the language code for the target language to use.
4. TargetFileName
The full path and name of the target file to be written (created). An empty string ("") uses the default target file name.
5. Encoding
(Optional) Character encoding; the string containing the encoding to use, e.g., "default," "UTF-8," or "UTF-16."
NOTES: This parameter is optional. Also, the encoding is only used for text files and Java properties files- otherwise the given encoding is ignored.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
rwtcmd /WriteTargetFile "mytrans.rwtproject" "files\app.rc" it-IT "files\it\appIT.rc "UTF-16" /a
rwtcmd /wt "mytrans.rwtproject" "files\app.ini" it-IT "files\app-italy.ini "UTF-16" /a
rwtcmd /wt "mytrans.rwtproject" "files\strings.dll" it-IT "files\strings-italy.dll
|
^ TOP ^
|
·
|
/WriteAllTargetFiles
/WriteAllTargetFiles (1. ProjectFileName) (2 TargetLangCode) [Encoding]
or /wa ...
DESCRIPTION:
|
Writes all of a translation project with the optional use of a given encoding (e.g., "default," "UTF-8," or "UTF-16" for Java properties files). If the encoding value cannot be applied to a given file type, it will be ignored. The target files will be written according to the target path rules specified for the translation project.
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. TargetLangCode
Target language; the language code for the target language to use.
3. Encoding
(Optional) Character encoding; the string containing the encoding to use, e.g., "default," "UTF-8," or "UTF-16."
NOTES: This parameter is optional. Also, the encoding is only used for text files and Java properties files- otherwise the given encoding is ignored.
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
|
rwtcmd /WriteAllTargetFiles "mytrans.rwtproject" zh-TW /a
rwtcmd /wa "mytrans.rwtproject" zh-TW
|
^ TOP ^
|
·
|
/WriteMultiLangTargetFile
/WriteMultiLangTargetFile (1. ProjectFileName) (2. SourceFileName)
(3. TargetLangCodes) (4. TargetFileName) [Encoding]
or /wmt ...
DESCRIPTION:
|
This command can only be used only to write Win32 EXE/DLL multiple-language .
|
PARAMETERS:
|
1. ProjectFileName
Project file; the full path to the (.rwtproject).
2. SourceFileName
Resource file; the full path to the .
3. TargetLangCodes
The target language codes to use- one or more target languages separated by commas. The parameter (list of language codes) must be contained in apostrophes (example: "en-US, de, ja-JP").
4. TargetFileName
The full path and name of the target file to be written (created). An empty string ("") uses the default target file name.
5. Encoding
NOT USED (August 2007).
|
RETURN VALUE:
|
"0" when successful.
|
EXAMPLE:
rwtcmd.exe /WriteMultipleLangTargetFile "MyApp.rwtproject" MyApp.EXE "it, de, fr" MyApp-MultiLang.EXE
rwtcmd /wmt "MyApp.rwtproject" MyApp.EXE "zh-TW, ja-JP" MyApp-MultiLang.EXE
|
A sample project can be found in RC-WinTrans' "Samples" folder:
\Samples\Translation\ScribbleMultiLangEXE\ScribbleMultiLangExe.rwtproject
The sample includes a "WriteTgt.bat" to write the English Win32 "ScribbleUC.exe" as a multiple-language EXE file with the following languages: English (source), German, and Japanese.
|
A switch is added to a command to modify the command's behavior. Switches may be any (logical) combination of the following:
WARNING: This switch should only be used if there has already been an instance in which RC-WinTrans has crashed. This switch will try to KILL the RC-WinTrans process. DO NOT use this switch unless there is a serious problem.