-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Features | ||
|
||
## Translation command | ||
|
||
A command can Translate a Content for you | ||
|
||
`php bin/console ibexa:automated:translate [contentId] [serviceName] --from=eng-GB --to=fre-FR` | ||
|
||
|
||
## Adding your own Remote Translation Service | ||
|
||
This bundle enables you to provide your own Translation mechanism. | ||
|
||
To do so, you need to: | ||
|
||
- create a service that implements Ibexa\Contracts\AutomatedTranslation\Client\ClientInterface | ||
- implements the methods | ||
- tag this service: `ibexa.automated_translation.client` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Installation | ||
|
||
## Requirements | ||
|
||
* eZ Platform 4.x | ||
* PHP 7.4+ | ||
|
||
## Installation steps | ||
|
||
Run `composer require ibexa/automated-translation` to install the bundle and its dependencies: | ||
|
||
### Change bundle's position in the configuration | ||
|
||
The new bundle is automatically enabled in the configuration thanks to Flex. Even though, it's important and required to move `Ibexa\Bundle\AutomatedTranslation\IbexaAutomatedTranslationBundle::class => ['all' => true]` before `Ibexa\Bundle\AdminUi\IbexaAdminUiBundle::class => ['all' => true],` due to the templates loading order. | ||
|
||
```php | ||
<?php | ||
|
||
return [ | ||
... | ||
Ibexa\Bundle\AutomatedTranslation\IbexaAutomatedTranslationBundle::class => ['all' => true], | ||
Ibexa\Bundle\AdminUi\IbexaAdminUiBundle::class => ['all' => true], | ||
... | ||
]; | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
Add a new configuration file with below information | ||
``` | ||
#app/config/ibexa_automated_translation.yaml | ||
ibexa_automated_translation: | ||
system: | ||
default: | ||
configurations: | ||
google: | ||
apiKey: '%env(GOOGLE_API_KEY)%' | ||
deepl: | ||
authKey: '%env(DEEPL_API_KEY)%' | ||
``` | ||
Add your API key(s) in .env file | ||
|
||
``` | ||
GOOGLE_API_KEY=... | ||
DEEPL_API_KEY=... | ||
``` |