Download the PHP package thejano/text-translator without Composer
On this page you can find all versions of the php package thejano/text-translator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thejano/text-translator
More information about thejano/text-translator
Files in thejano/text-translator
Package text-translator
Short Description A package to translate text from Google Translator for free without api.
License MIT
Homepage https://github.com/thejano/text-translator
Informations about the package text-translator
Text Translator for PHP
This package allows text translation using Google Translate for free without an API. It extracts the translated text from the Google Translate website. Meanwhile, it only supports Google Translate.
Supported Languages for Google Translate
https://cloud.google.com/translate/docs/languages
Requirement
The package requires:
- PHP 8.0 or higher
Installation
You can install the package via composer:
Usage
You can use the package like below example
The class GoogleTranslator
by default the source language is set to Auto, also you can override and provide target language on initiation.
The translate
method can be called statically or non statically, and it accepts three parameters, which are:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Dr Pshtiwan
- All Contributors
License
The MIT License (MIT). Please see License File for more information.