Download the PHP package jefs42/libretranslate without Composer

On this page you can find all versions of the php package jefs42/libretranslate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package libretranslate

libretranslate

PHP Interface to the open source LibreTranslate project

Install

Composer (recommended)

Manual

Download the LibreTranslate.php file from src/ directory and place somewhere in you project.

Include the file in your project:

Usage

By default, this class will try to connect to and use a local installation of the LibreTranslate server at http://localhost:5000

Pass host and optionally port, source and/or target parameters to override defaults.

LibreTranslate Mirros

Set API Key

Depending on the server settings, you may need to provide a valid API key to make translation request.

Set Default Languages

The default source and target languages are set by the server. You may override these settings when constructing the class, or as needed:

Each translation function also supports specifying the languages to use when calling the function.


Detect Language

LibreTranslate will attempt to determine the language of the string passed to it.

Translate Text

Translate a string of text, or an array of multiple texts. A server may or may not have a character limit set. For larger texts see Translate File.

Translate File

Translate a file of text.

Check $translator->Settings(), current supported formats appear to be - .txt, .odt, .odp, .docx and .pptx

Suggest

Submit a suggested translation to the server.

Sugesstions must be enabled on the LibreTranslate server.


Get Available Languages

Get the list of languages available on the current server.

Check Server Settings

Get settings current server is running with.

See LibreTranslate Arguments for server settings.


LTManage

If you are running a locally hosted LibreTranslate server, you may have access to ltmanage. This allows you to view current keys and their request limits, as well as create new keys and delete current keys.

See LibreTranslate Manage Keys for details.

If ltmanage is found in the local path then the following additonal functions will be available for use:

listKeys

Will return an array of current keys and their request limits.

addKey

Create a new key for local server with optional request limit.

removeKey

Delete an existing key from the available keys.


All versions of libretranslate with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
ext-json Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jefs42/libretranslate contains the following files

Loading the files please wait ....