https://github.com/php-translation/translator
Services to translate strings, Like GoogleTranslate and BingTranslate
https://github.com/php-translation/translator
Last synced: about 1 year ago
JSON representation
Services to translate strings, Like GoogleTranslate and BingTranslate
- Host: GitHub
- URL: https://github.com/php-translation/translator
- Owner: php-translation
- License: mit
- Created: 2016-11-28T09:24:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T15:43:36.000Z (over 1 year ago)
- Last Synced: 2025-03-29T06:08:28.385Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 26.4 KB
- Stars: 25
- Watchers: 5
- Forks: 17
- Open Issues: 9
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Translator services
[](https://github.com/php-translation/translator/releases)
[](LICENSE)
[](https://packagist.org/packages/php-translation/translator)
**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](http://docs.php-http.org/en/latest/httplug/users.html).
When the client is installed you may install this package with composer by running:
``` bash
composer require php-translation/translator
```
## Intro
```php
$translator = new Translator();
$translator->addTranslatorService(new GoogleTranslator('api_key'));
echo $translator->translate('apple', 'en', 'sv'); // "äpple"
```