Next: , Previous: What Is Transtalo?, Up: Top



2 Invoking the transtalo Command

The transtalo command provides a simple user interface to the Transtalo library. It currently only has support for single sentences, whole text translation support will be added later.

transtalo uses commands to specify what it must do.

Normal Translation

The command for translating a sentence from one language to another, is translate or l2l (language to language):

     transtalo translate|l2l source-lang dest-lang sentence

source_lang is the source language, dest_lang the target language, and sentence is the sentence to be translated. For example

     transtalo translate en de "This is a sentence."

should output “Dies ist ein Satz.” (but it doesn't at this time as there neither is an English input module nor a German output module).

Human Language to XML File

If you want to translate only from the source language and want to stop after that, outputting the XML file, use the lang2xml or l2x commands:

     transtalo {lang2xml|l2x} source-lang sentence [output-file]

Where output-file is the output location for the XML file.

XML File to Human Language

If you only want to do the translation to the target language using an XML sentence file, use the xml2lang or lang2xml commands:

     transtalo {xml2lang|x2l} xml-file dest-lang

This will output the final sentence.

2.1 Options

The following table lists the options for the transtalo command.

--help
-h
Displays information about the command and exits
--info-inputmodule language
Displays information about the input module for language
--info-outputmodule language
Displays information about the output module for language
--dialect-source dialect
Use dialect as dialect for the source language
--dialect-dest dialect
Use dialect as dialect for the target language
--list
-l
Lists all installed modules
--quiet
-q
Display neither messages nor errors while translating
--verbose
-v
Display much information about the translation progress
--version
-V
Displays the version information about the command and exits

2.2 Language Codes

The language codes used come from the iso 639 specification. If you want to know which code you have to use, you can type transtalo --list to see which languages are installed: you'll see both the codes and full names.