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. |
|
SAMPLE: |
rwtcmd.exe /AddLanguage
"c:\dir\mytrans.rwtproject"
ja-JP
/a
rwtcmd.exe /a
mytrans.rwtproject
"fr" |
^ TOP ^ |
|
· |
/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. |
|
SAMPLE: |
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. |
|
SAMPLE: |
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." |
|
SAMPLE: |
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. |
|
SAMPLE: |
rwtcmd.exe /CreateProject
"c:\dir\mytrans.rwtproject"
"My
Project1" it-CH
rwtcmd.exe /c
"c:\dir\mytrans.rwtproject"
"My
Project1" en-UK |
^ 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. |
|
SAMPLE:
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." |
|
SAMPLE: |
rwtcmd /IsProjectUpToDate
"mytrans.rwtproject"
en-US
/a
rwtcmd /pd "mytrans.rwtproject"
ja-JP
/a |
^ TOP ^ |
|
· |
/IsTranslated
/IsTranslated (1. ProjectFileName)
(2. TargetLangCode) (3. SourceFileName)
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. ProjectFileName
Project file; the full path to the
(.rwtproject).
2. TargetLangCode
Target language; the language
code for the language to be checked.
3. SourceFileName
The full path to the
to be checked. |
|
RETURN VALUE: |
"1" if the project is translated
for the specified language; otherwise "0." |
|
SAMPLE:
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 |
^ 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." |
|
SAMPLE:
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. |
|
SAMPLE: |
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. |
|
SAMPLE: |
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. |
|
SAMPLE:
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. |
|
SAMPLE: |
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 . Other
suitable multiple-language files types (e.g., XML files or MC files) will
be supported in future too. |
|
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. |
|
SAMPLE:
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.