Skip to content

Commit fd51033

Browse files
bocharsky-bwNyholm
authored andcommitted
Add Yandex translator support (#151)
* Allow Yandex translator to be specified * Declare service for Yandex translator * Removed bing
1 parent beadb00 commit fd51033

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private function addAutoTranslateNode(ArrayNodeDefinition $root)
182182
->arrayNode('fallback_translation')
183183
->canBeEnabled()
184184
->children()
185-
->enumNode('service')->values(['google', 'bing'])->defaultValue('google')->end()
185+
->enumNode('service')->values(['google', 'yandex'])->defaultValue('google')->end()
186186
->scalarNode('api_key')->defaultNull()->end()
187187
->end()
188188
->end()

Resources/config/auto_translation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ services:
1919
php_translation.translator_service.google:
2020
class: Translation\Translator\Service\GoogleTranslator
2121
arguments: ["%php_translation.translator_service.api_key%"]
22+
23+
php_translation.translator_service.yandex:
24+
class: Translation\Translator\Service\YandexTranslator
25+
arguments: ["%php_translation.translator_service.api_key%"]

0 commit comments

Comments
 (0)