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 service and translation provider manager via 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:

        class: Pimcore\TranslationsProviderInterfaceBundle\TranslationsProvider\TranslationsCom
        public: true
            $shortcut: ''
            $projectShortCode: '%translations_com.project-shortcode%'
            - method: setTranslationExporter
                  - '@translations-exporter.translationscom'

        class: Pimcore\TranslationsProviderInterfaceBundle\TranslationsProvider\XPlanation
            $shortcut: 'XPlanation'
            $projectShortCode: '%XPlanation.project-shortcode%'

To add custom instances of these translation providers or implement additional custom translation providers, just override the existing or register new services.

Unit Tests

These parameters are used for the available unit tests. Execute them with the command ./vendor/phpunit/phpunit/phpunit dev/pimcore/translations-provider-interfaces/tests [options].

Please have a look at the unit tests and the PHPUnit documentation for further information.