php-translation / translator
Translator services
Installs: 213 518
Dependents: 4
Suggesters: 0
Security: 0
Stars: 25
Watchers: 6
Forks: 16
Open Issues: 7
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
README
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"