DeskShare homepage Deutsch   Français    Español   Portuguese   
.
  Products  
 
 
 
 
Pages:
  
1.Index
2.Introduction
3.Understanding User Interface
4.Getting Started with Translation
5.Working with Translation Memory
6.Utilities
 
Command-line Translation
User Specified Tags
Translation of Code
7.Trouble Shooting
8.Resources
 
 
  Site Translator v2.45
   
 

Site Translator : Command Line Translation

Command Line Translation

Command Line helps you to use Site Translator to translate web pages and web sites by typing commands on the command prompt.  This makes it simple for you to automate translations using a batch file.  Almost all programming environments also provide the means to invoke executables and pass them the required command line parameters.

Using Command Lines

Command line parameters are used on the command prompt.  To bring up the command prompt:

  1. On the Windows task bar, click Start.
  2. Click Run.
  3. Type cmd and click OK. (On Windows 98, 98SE and ME type command).

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.

Legends for Syntax Representation

When representing syntax of Site Translator's command line parameters, these legends are used:

Legend Meaning
Bold The text that appears in bold must be typed as shown.
Italics Text in italics should be replaced with actual data.  For instance, if "URL" is in italics, it means that you should type an actual Internet address instead of the word "URL".
Normal Text that appears in the standard font represents a command line parameter and the document further explains its meaning.
Pipe Symbol (|) The pipe symbol means “or” and appears between two options, either of which can be used.
[Square Brackets] Any text that appears within square brackets is optional.  When mentioned, the text in square brackets does not include the brackets.

Usage to Translate a Web Site (From A Local File or Folder)

Syntax:

sitetranslator site source from-language to-language -fw|-fo [-u] destination

Where  
Source (Required) The source folder that contains files for the web site you want to translate.  This can also be a file name.
from-language (Required) This is the source language of the web site’s pages.  Make sure that Site Translator supports the specified source language.
to-language (Required) This is the language to which you want to translate the web site.  Make sure that Site Translator supports the specified destination language.
destination Where you would like Site Translator to save the translated files.  A path to a folder.
-fw (This option or –fo required) If the destination file is already present then Site Translator informs you by giving a message.
-fo (This option or –fw required) If the destination file is already present then Site Translator overwrites the file without prompting you.
-u (Optional) By default, Site Translator works in the background (does not open a window).  If you specify this option then Site Translator appears and displays the translation status.

For example, to translate all web pages present in the D:\DeskShare folder from English to German, use the command:

sitetranslator site "D:\DeskShare" english german –fo "D:\DeskShare-German"

This example assumes that the pages are present in the folder “D:\DeskShare” and you want the translated pages in the folder “D:\DeskShare-German”.

To translate a single web page instead of all web pages in a folder, you can use the command:

sitetranslator site "D:\DeskShare\index.htm" english german –fo "D:\DeskShare-German"

Site Translator will translate the page "index.htm" present in the folder "D:\DeskShare" from English to German and save it to the folder "D:\DeskShare-German".  Site Translator will automatically name the translated file as "de_index.htm" (by prefixing the two-letter abbreviation of the translated language to the name of the file).

Usage to Translate a URL

Syntax:

sitetranslator url source from-language to-language -u|-o destination

Where  
Source (Required) This is the source URL of the web page to translate.
from-language (Required) This is the source language of URL.  Make sure that Site Translator supports the specified source language.
to-language (Required) This is the language to which you want to translate the URL.  Make sure that Site Translator supports the specified destination language.
destination Where you would like Site Translator to save the translated files.  A path to a folder.
-o (This option or -u required) This displays the output of the translated URL in the default web browser.
-u (This option or -o required) This displays the output in Site Translator.

For example, to translate the home page of DeskShare from English to German, use the command:

sitetranslator url "http://www.deskshare.com" english german -o

Copyright © DeskShare Incorporated. All rights reserved.