Installation and Configuration
Installation Process
To install Pimcore Translations Provider Interfaces for Pimcore 11.0 or higher, follow the three steps below:
- Install the required dependencies:
composer require pimcore/translations-provider-interfaces
- Make sure the bundle is enabled in the
config/bundles.phpfile. The following lines should be added:
use Pimcore\TranslationsProviderInterfaceBundle\PimcoreTranslationsProviderInterfaceBundle;
// ...
return [
// ...
PimcoreTranslationsProviderInterfaceBundle::class => ['all' => true],
// ...
];
- Install the bundle:
bin/console pimcore:bundle:install PimcoreTranslationsProviderInterfaceBundle
Deployment hint
For deployments of applications with this bundle via deployment pipelines without actual database access, the Symfony cache warming process could fail as doctrine ORM tries to determine the database version on cache warm-up to build its cache. Therefore, it is recommended to configure the database server version in the default DBAL connection like this:
doctrine:
dbal:
default_connection: default
connections:
default:
...
server_version: mariadb-10.11.0
User Permissions
The installer creates the following user permissions in the category Translation Provider Interfaces. Assign them per user or role in Pimcore Studio.
| Permission key | Enforced on | Effect |
|---|---|---|
translations_job_list | All translation job endpoints (list, view data, submit, receive, process, cancel, delete, check redelivery, reset error) | Required to open the Translation Jobs Queue and to run any action on a job |
translations_job_config | Configuration read/write endpoints and the translation request endpoints | Required to read and save the bundle configuration and to request a translation for an element |
The bundle also declares translations_job_creation. The installer creates it, but no endpoint currently checks it,
so granting or revoking it has no effect.
These permissions are enforced with #[IsGranted] on the PHP controllers, so they protect the API and not only the
user interface.
Independently of them, the bundle registers perspective context permissions translations.translationJobsQueue and
translations.translationsProviderInterfacesConfiguration, plus the element context permission requestTranslation
for assets, documents and data objects. These control which entries a perspective shows, not what the API allows.
Setup before starting
Depending on usage, desired workflow and used translation providers, additional configuration might be needed. This might include
- Setting the configuration, either in the configuration user interface or in the Symfony
configuration tree. Run
bin/console config:dump-reference PimcoreTranslationsProviderInterfaceBundlefor the current option reference. - Setting up manual triggering or automatic change detection
- Defining (additional) translation provider services
- Automatic execution of commands via crontab