Download the PHP package aurawindsurfing/google-translate without Composer
On this page you can find all versions of the php package aurawindsurfing/google-translate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aurawindsurfing/google-translate
More information about aurawindsurfing/google-translate
Files in aurawindsurfing/google-translate
Package google-translate
Short Description Free Laravel package for Paid Google Translate REST API with your own API key
License MIT
Homepage https://github.com/aurawindsurfing/google-translate
Informations about the package google-translate
Laravel package for Google Translate REST API
Package allows to work with Google Translate API
Installation
Package can be installed using composer by adding to "require" object
or from console:
Configuration
After the installation, you should add "Dedicated\GoogleTranslate\GoogleTranslateProvider" to providers.
Then you should publish config file to be able to add your Google API key. To publish config you should do:
After config is published, you will have it in config\google-translate.php
of your Laravel project directory
You should change only one line:
Usage
To translate text with given source language and target language:
By default language detection is turned on, so you can translate text without specifying source language.
This will make 2 requests to google API:
- First request will go to /detect URL and get source language name
- Second request will make actual translate request and give out result.
You can also use function to only detect text's source language:
License
This repository code is open-sourced software licensed under the MIT license.