This command exports module translations to XLF (XLIFF) files that can be distributed with a module package. It allows module developers to extract translations from the database and package them for distribution.
php bin/console prestashop:translation:export-module <module> [locale] [options]
ps_banner, mymodule)en-US, fr-FR, pl-PL, or just fr, en, pl). If not specified, all available locales will be exported.Export translations for all available languages:
php bin/console prestashop:translation:export-module ps_banner
This creates a ZIP file containing XLF files for all locales (e.g., en-US, fr-FR, es-ES, etc.).
Export only French translations:
php bin/console prestashop:translation:export-module ps_banner fr-FR
Or using ISO code:
php bin/console prestashop:translation:export-module ps_banner fr
Export translations and install the module first if needed:
php bin/console prestashop:translation:export-module mymodule --auto-install
The command generates a ZIP file containing:
translations/<locale>/Modules<Modulename><Domain>.<locale>.xlfExample structure:
mymodule-translations.zip
└── translations/
├── en-US/
│ ├── ModulesMymoduleAdmin.en-US.xlf
│ └── ModulesMymoduleShop.en-US.xlf
└── fr-FR/
├── ModulesMymoduleAdmin.fr-FR.xlf
└── ModulesMymoduleShop.fr-FR.xlf
translations folder in your module root directoryWhen users install your module, PrestaShop will automatically use these translation files.
The command will fail if:
--auto-install is used)