|
|
This is a bundle for Ibexa DXP. It allows managing string translations for use in themes outside Ibexa's regular content object and translation logic. While there are a couple of i18n concepts pre-included with Ibexa, they lack a user interface. So here's a simple Doctrine ORM based approach with a UI, string search, Deepl integration, and very basic approval flow for translation editors.
- Ibexa DXP >= v5.0
- Ibexa DXP >= v4.4
- Ibexa Automated Translations installed, activated and configured ibexa/automated-translation if you want to use Deepl Translations
- Supports Deepl Free API Key - by replacing the Ibexas' default Deepl Client
- 3-layered caching: OPCache via static PHP Array and Redis if available
- Event Listeners warm caches when there are changes
- Brings a console command for cache warming
- Supports headless frontends by providing JSON and Typescript language files
- Allows importing/exporting translations to and from CSV
- Supports Doctrine Fixtures to pre-popultae translations.
- Supports Ibexa DXP v5.0+ and v4.4+
If your project uses Symfony Flex (recommended), the bundle, its configuration, and routes are registered automatically:
composer require vardumper/ibexa-theme-translations-bundleA migration file is automatically copied into your app's migrations/ directory by the Flex recipe. Run it to create the required database tables:
bin/console doctrine:migrations:migrateManual installation (without Symfony Flex)
return [
// ...
vardumper\IbexaThemeTranslationsBundle\IbexaThemeTranslationsBundle::class => ['all' => true],
];# config/packages/ibexa_theme_translations.yaml
doctrine:
orm:
mappings:
IbexaThemeTranslationsBundle:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/vendor/vardumper/ibexa-theme-translations-bundle/src/Entity'
prefix: 'vardumper\IbexaThemeTranslationsBundle\Entity'
alias: IbexaThemeTranslations# config/routes/ibexa_theme_translations.yaml
ibexa_theme_translations:
resource: '@IbexaThemeTranslationsBundle/config/routes.yaml'bin/console doctrine:migrations:migrateThis library is fully unit tested with PEST. You can run the tests by executing the following commands in the root directory of the project.
vendor/bin/pest
You can also generate a coverage report by running the following command.
XDEBUG_MODE=coverage vendor/bin/pest --coverage-html=coverage-report