EnglishFrenchSpanish

OnWorks favicon

translate-bin - Online in the Cloud

Run translate-bin in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command translate-bin that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


translate - translate a text or web page

SYNOPSIS


translate {-? | -v | --list-services}

translate [-s services] [-f lang] [-t lang] {-l}

translate [-s services] [-f lang] [-t lang] {http_url | https_url}

translate [-s services] [-f lang] [-t lang] [--max-threads=n] [--max-retries=n] [file]

DESCRIPTION


translate translates a text or web page.

If the first synopsis form is used, translate prints a quick help, the version information
or the list of available translation services to standard output.

If the second synopsis form is used, translate prints the list of available language pairs
to standard output.

If the third synopsis form is used, translate translates the web page pointed to by
http_url or https_url, and prints the URL of the translated web page to standard output
(http_url must be a string starting with http://, and https_url must be a string starting
with https://).

If the fourth synopsis form is used, translate translates the text contained in file, and
prints the translation to standard output (if file is omitted or given as a single dash,
standard input is used instead).

OPTIONS


-?, --help
Prints a quick help to standard output.

-v, --version
Prints version information to standard output.

--list-services
Lists the available translation services.

-s services, --services=services
Specifies the translation services to use. The services argument must be a
comma-separated list of service names (default value: all the available services).

The list of services determines the available language pairs. The order of the list
is important, as libtranslate iterates over the list until the requested
translation can be performed.

-l, --list-pairs
Lists the available language pairs.

The -f and -t options can be used to specify a source and/or destination language
filter. If neither -f nor -t is specified, all the pairs are listed.

-f lang, --from=lang
Specifies the source language of a translation. The lang argument must be a RFC
3066 language tag such as en or zh-TW (default value: see Language Selection).

-t lang, --to=lang
Specifies the destination language of a translation. The lang argument must be a
RFC 3066 language tag such as en or zh-TW (default value: see Language Selection).

--max-threads=n
Specifies the maximum number of concurrent threads to use for translating text
(default value: 8).

--max-retries=n
Specifies the maximum number of retries per text chunk (default value: 3).

LANGUAGE SELECTION


Definitions: in this section, default_from is defined as the contents of the environment
variable TRANSLATE_DEFAULT_FROM, or, if that variable is not set, en; default_to is
defined as the contents of the environment variable TRANSLATE_DEFAULT_TO, or, if that
variable is not set, fr.

If the source language is not specified, it defaults to default_from, or, if the
destination language is equal to default_from, default_to.

If the destination language is not specified, it defaults to default_to, or, if the source
language is equal to default_to, default_from.

CHARACTER SET HANDLING


Internally, libtranslate uses the UTF-8 encoding.

If the input text is not encoded in UTF-8, translate assumes it is encoded in the
character set of the current locale, and attempts to convert it to UTF-8. If the
conversion fails, translate exits with an error.

The output text is converted to the character set of the current locale before printing.

EXAMPLES


In the following examples, it is assumed that TRANSLATE_DEFAULT_FROM is set to es and that
TRANSLATE_DEFAULT_TO is set to de.

translate -f fr -l
Lists all the available language pairs where the source language is French.

translate document1
Translates the contents of the file document1 from Spanish to German and prints the
result to standard output.

translate -s babelfish,freetranslation document1
Translates the contents of the file document1 from Spanish to German, only using
the Babel Fish and FreeTranslation services, and prints the result to standard
output.

translate -f de document1
Translates the contents of the file document1 from German to Spanish and prints the
result to standard output.

echo "Le problème est résolu." | translate -f fr -t en
Translates the text given on standard input from French to English and prints the
result to standard output.

translate -t en http://www.freebsd.org/es/index.html
Translates the web page pointed to by http://www.freebsd.org/es/index.html from
Spanish to English and prints an URL pointing to the result to standard output.

DIAGNOSTICS


The translate utility exits with a status of 0 on success, and >0 if an error occurs.

ENVIRONMENT


The following environment variables affect the execution of translate:

HTTP_PROXY
The URL of the proxy to use for HTTP requests.

http_proxy
Same as HTTP_PROXY, for compatibility.

TRANSLATE_DEFAULT_FROM
The default source language (see Language Selection).

TRANSLATE_DEFAULT_TO
The default destination language (see Language Selection).

Use translate-bin online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Image Downloader
    Image Downloader
    Crawl and download images using
    Selenium Using python3 and PyQt5.
    Supported Search Engine: Google, Bing,
    Baidu. Keywords input from the keyboard
    or input from ...
    Download Image Downloader
  • 2
    Eclipse Tomcat Plugin
    Eclipse Tomcat Plugin
    The Eclipse Tomcat Plugin provides
    simple integration of a tomcat servlet
    container for the development of java
    web applications. You can join us for
    discussio...
    Download Eclipse Tomcat Plugin
  • 3
    WebTorrent Desktop
    WebTorrent Desktop
    WebTorrent Desktop is for streaming
    torrents on Mac, Windows or Linux. It
    connects to both BitTorrent and
    WebTorrent peers. Now there's no
    need to wait for...
    Download WebTorrent Desktop
  • 4
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 5
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 6
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • More »

Linux commands

Ad