php-translation/translator
Translator services
Maintainers
1.2.0
2021-03-26 18:20 UTC
Requires
- php: ^7.2 || ^8.0
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.7
- php-http/httplug: ^1.0 || ^2.0
- psr/log: ~1.0
Requires (Dev)
- nyholm/nsa: ^1.1
- nyholm/psr7: ^1.2
- php-http/curl-client: ^1.0 || ^2.0
- php-http/message: ^1.8
- phpunit/phpunit: ^8.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT a3bbb60beaaf44fe94c8d78783435c2c8884d094
- Tobias Nyholm <tobias.nyholm.woop@gmail.com>
README
π Latest Version
π Software License
π Total Downloads
Services that can be used to translate strings
Install
The first thing you need to do is to install a HTTP client. Please read HTTPlug quickstart. When the client is installed you may install this package with composer by running:
composer require php-translation/translator
Intro
$translator = new Translator(); $translator->addTranslatorService(new GoogleTranslator('api_key')); echo $translator->translate('apple', 'en', 'sv'); // "Γ€pple"
