Download the PHP package ferdiunal/laravel-translator without Composer

On this page you can find all versions of the php package ferdiunal/laravel-translator. 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 laravel-translator

Laravel Translator

English | Türkçe

A type-safe and extensible translation package for Laravel applications with multiple provider support.

Supported providers:

Requirements

Installation

Publish the configuration file:

Basic usage

Facade:

Helper:

Resolving a provider instance:

run() preserves Laravel placeholders. Placeholders such as :name and :count are not translated, and characters such as @ inside email addresses are not corrupted.

Provider keys and aliases

Canonical provider keys:

Provider Canonical key Legacy/compatible alias
Google google -
Bing bing -
DeepL deepl -
MyMemory mymemory myMemory
NLP Cloud nlpcloud nlpCloud
OpenAI openai -

Acronym and case differences are no longer resolved through runtime class-name guessing. Provider resolution uses an explicit registry, so names such as OpenAI, DeepL, NLPCloud, and MyMemory are not fragile on Linux or PSR-4 case-sensitive environments.

Get the list of active providers:

Configuration

The published config/translator.php file contains these fields in summary:

The package does not ship a default secret or API key. API keys must be provided through .env.

Adding a custom provider

Custom provider classes must extend Ferdiunal\LaravelTranslator\Translators\Translator.

config/translator.php:

Usage:

Disabling or overriding providers

Disable a built-in provider:

Override built-in provider metadata or driver:

Invalid custom provider classes throw InvalidTranslatorProviderException; unknown or disabled providers throw UnsupportedTranslatorException.

Using OpenAI-compatible endpoints

The OpenAI provider supports OpenAI-compatible endpoints through OPENAI_BASE_URL:

Tests and quality gates

Single command:

The CI matrix is designed to cover PHP 8.2/8.3/8.4/8.5 and Laravel 10/11/12/13 combinations.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-translator with dependencies

PHP Build Version
Package Version
Requires deeplcom/deepl-php Version ^1.9
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
illuminate/support Version ^10.0||^11.0||^12.0||^13.0
nlpcloud/nlpcloud-client Version ^1.0
openai-php/client Version ^0.10.3
php Version ^8.2
spatie/laravel-package-tools Version ^1.16
stichoza/google-translate-php Version ^5.2
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 ferdiunal/laravel-translator contains the following files

Loading the files please wait ...