Download the PHP package tailrdigital/sulu-translations-bundle without Composer
On this page you can find all versions of the php package tailrdigital/sulu-translations-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sulu-translations-bundle
Sulu Translations Bundle
This package provides a Sulu admin panel for managing your website translations.
The package includes a custom Symfony translation provider which stores your translations in a database.
Demo
https://github.com/user-attachments/assets/65278818-b376-4c6b-816d-9dceab905140
Installation
Register the bundle
Make sure the bundle is activated in config/bundles.php
:
Register new admin routes
You need to manually register the failed queue admin controller routes in the file config/routes_admin.yaml
.
Add node dependency
Register an additional module in your admin's node dependencies via assets/admin/package.json
:
Make sure to load the additional node module in your admin's assets/admin/index.js
or assets/admin/app.js
file:
Recompile your admin assets
Configuration
Configuring the provider
You have to add the database provider to the Symfony translator configuration. This is an example configuration for the config/packages/translation.yaml
file.
Doctrine DBAL connection
The hostname in the DSN is actually your Doctrine DBAL connection name: database://<dbal_connection_name>
.
If you want to store your translations in a separate database (preferred), you could configure a new DBAL connection and use the connection name in the DSN of the database translation provider.
If you are using your default DBAL connection you probably want to configure doctrine.dbal.schema_filter
so your migrations doesn't try to drop the tailr_translations
table.
Export format
If you want to export your translations via the administrator panel, you should define the format or extension which is used for your translation files.
Permissions
Make sure you've set the correct permissions in the Sulu admin for this package. Go to Settings > User Roles and enable the permissions (tailr_translations) you need. Afterwards you could find the translations view/panel via Settings > Manage translations.
Usage
First make sure the database table tailr_translations
is created by running the command below.
If you don't have local translations files (e.g. CSV) you can generate them by using the command below.
Once you have local translation files, you can export them to the database by using command below.
Next you can update the translations via the Sulu admin panel.
Once you are done, you can export the translations back to the translations files by using the command below or clicking the Export translations button via the Sulu admin panel.
After pulling the translations, you may need to clear the cache(s).
Known limitations
Only tested and used with CSV and YAML format.
All versions of sulu-translations-bundle with dependencies
azjezz/psl Version ^2.6 || ^3.0
doctrine/dbal Version ^3.6
jackalope/jackalope-doctrine-dbal Version ^1.7 || ^2.0
ramsey/uuid Version ^4.7
sulu/sulu Version ^2.5
symfony/clock Version ^6.0 || ^7.0
symfony/config Version ^6.0 || ^7.0
symfony/console Version ^6.0 || ^7.0
symfony/dependency-injection Version ^6.0 || ^7.0
symfony/http-foundation Version ^6.0 || ^7.0