charef / free-translate-api
Simple laravel package for talking to Google's Translate API for free.
Installs: 54
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/charef/free-translate-api
This package is auto-updated.
Last update: 2025-10-16 08:40:42 UTC
README
Installation
Video Tutorial
You need to translate your text ?
First, pull in the package through Composer.
Run composer require charef/free-translate-api
And then, if using Laravel 5 or >, include the service provider within config/app.php.
'providers' => [ Charef\FreeTranslateApi\FreeTranslateAPIServideProvider::class, ];
And, for convenience, add a facade alias to this same file at the bottom:
'aliases' => [ 'TranslateAPI' => Charef\FreeTranslateApi\TranslateAPI::class, ];
Usage
you need just to define source and target langage and text ...
use Charef\FreeTranslateApi\TranslateAPI; public function translate() { $source = 'ar'; $target = 'en'; $text = 'مرحبا'; $result=TranslateAPI::translate($source, $target, $text); // Welcome dd($result); }