| Site Translator : Command Line Interface |
Translate Files using the Command Line
The Command Line Interface allows you to access the
various features of Site Translator. Most of the feature offered in Site
Translator can be accessed from the command line. Site Translator can translate
HTM, HTML, ASP.NET, ASCX, PHP, PHP3, PHTML, RESX and XML files through the
command line interface. The command line feature makes it easier to automate the
translation process using a batch file or directly from another application.
Using The Command Lines Options
The command line interface can be accessed from the
command prompt.
The following steps show you how to access the command
prompt:
- On the Windows task bar, click Start.
- Click Run.
- Type cmd and click OK.
After invoking the command prompt, you must change
your current drive and folder to where Site Translator is installed. Assuming
Site Translator's default install folder (C:\Program Files\DeskShare\Site
Translator):
- To change the drive to C: (from another drive), type C: and press Enter.
- To change to the install folder, type chdir C:\Program
Files\DeskShare\Site Translator and press Enter.
Now you can start using Site Translator's command line
parameters.
“Site
Translator” <path of File
or Folder that is to be translated> -from <Original Language> -to
<Language to Translate to> -out <Folder Path> [-subdir]
[-skip]
[-help]

| Figure 1: Site Translator - Command Line Interface |
-from <language>: This is the source language
of the web site’s pages. Make sure that Site Translator supports the specified
source language.
-to <language>: This is the language to which
you want to translate the web site. Make sure that Site Translator supports the
specified destination language.
-out <Folder Path>: Translated files or folders
will be saved here.
-subdir: Includes all files in the current
directory and subdirectories according to the wildcard specifications.
-skip: If the destination folder already
contains the file which is already translated then such file can be skipped from
translation by using this option. If this switch is not used then by default the
destination files will be overwritten with corresponding source files after
translation.
-help or -?: Displays usage message.
Supported Languages: Site Translator supports
18 languages. Initially, English and Spanish are provided free of cost for a
year. After a year, you will need to purchase the supported languages. In Figure
1, Italian and Spanish are the purchased languages.
Translating File Types
The command line provides you the advantage of
translating a particular file type such as .HTML, ASP.NET, PHP etc. from a list
of files.
For instance, if you just want to translate ASPX files
in a folder, you need to type the following command:
C:\Program Files\DeskShare\Site Translator>"Site
Translator.exe" "D:\Deskshare\*.aspx -from <Original
Language> -to
<Language to Translate to> -out <Folder Path>
All the *.ASPX files will be translated. The other
file types in the same folder will not be translated.
Accessing Site Translator through the command line
interface provides you the option to translate file(s) and folder(s) easily.
Also, you can choose as to which file types you want to translate in the same
folder. You can save a lot of time by using the command line feature.
|