pmdevelopment / translate-bundle
Google Translate API Bundle for Symfony2
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pmdevelopment/translate-bundle
Requires
- php: >=5.4.0
- google/cloud: ^0.11.1
This package is not auto-updated.
Last update: 2022-01-19 12:22:58 UTC
README
Google Translate API Bundle
Config.yml
"from" and "to" are optional. Default is "en" to "de".
pm_translate: api_key: '%google_api_translate_key%' from: de to: en
Usage
/* * Default Language */ $translation = $this->get('pm_translate.services.translation_service')->translate($keywordName); /* * Custom Language */ $translation = $this->get('pm_translate.services.translation_service')->translate($keywordName, 'en', 'fr');