Download the PHP package gino-pane/laravel-phpolyglot without Composer
On this page you can find all versions of the php package gino-pane/laravel-phpolyglot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gino-pane/laravel-phpolyglot
More information about gino-pane/laravel-phpolyglot
Files in gino-pane/laravel-phpolyglot
Package laravel-phpolyglot
Short Description Laravel package wrapper for PHP package for translation, spelling correction and text-to-speech (TTS) synthesis using external APIs
License MIT
Homepage http://github.com/GinoPane/laravel-phpolyglot
Informations about the package laravel-phpolyglot
Laravel PHPolyglot
Laravel package wrapper for PHPolyglot.
Requirements
- PHP >= 7.1;
- Laravel Framework.
Installation
composer require gino-pane/laravel-phpolyglot
As per Laravel 5.5+ service provider and facade will be registered automatically when installing. For previous versions please register service provider and facade manually. Optionally, after package installation please make sure to publish its configuration (if it was not done automatically by composer command):
php artisan vendor:publish --provider="GinoPane\LaravelPhpolyglot\LaravelPhpolyglotProvider" --tag=config
or
composer run-script publish-config -d ./vendor/gino-pane/laravel-phpolyglot
Also make sure to manually put your specific credentials from PHPolyglot's .env
file into Laravel's .env
because automatic changes to .env
are not welcome:
PUSHER_APP_KEY=...
PUSHER_APP_SECRET=...
PUSHER_APP_CLUSTER=...
...
YANDEX_TRANSLATE_API_KEY=...
...
After this you could do something like this in your Laravel's web.php
:
Route::get('/', function () {
echo (string)PHPolyglot::translate('welcome', 'it');
});
...to get nice "benvenuto" string in your browser when accessing your test project's root page.
Usage
Please refer to original PHPolyglot documentation.
Changelog
To keep track, please refer to CHANGELOG.md.
License
Please refer to LICENSE.