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
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 2
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 3
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • 4
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 5
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 6
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • More »

Linux commands

Ad