Development Details
General Aspects
Services for translation adapters and data changed handler are registered automatically when they implement the respecting
interfaces DataChangedHandlerInterface and TranslationsProviderInterface.
Register process implemented by
- automatically tagging all services that implement the mentioned interfaces via auto configuration during build
- registering all tagged services in
data changed serviceandtranslation provider managervia compiler pass
Translation Providers
Translation providers are implemented and configured as services. This bundle ships with default service configurations of the two supported translation providers:
services:
translations-provider.translationscom:
class: Pimcore\TranslationsProviderInterfaceBundle\TranslationsProvider\TranslationsCom
arguments:
$shortcut: 'translations.com'
$workflow: '@state_machine.translation_job_default'
calls:
- method: setTranslationExporter
arguments:
- '@translations-exporter.translationscom'
The project shortcode and the provider credentials are not service arguments. They are read from the bundle
configuration through ConfigurationService, see Configuration.
To add custom instances of these translation providers or to implement additional custom translation providers, override the existing services or register new ones.