承接 aeyoll/ps_translation 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aeyoll/ps_translation

Composer 安装命令:

composer require aeyoll/ps_translation

包简介

Translation module for PrestaShop

README 文档

README

Translation module for PrestaShop.

CLI Commands

Export Theme Translations

This command allows you to export theme translations in XLIFF format and automatically copy them to the theme's translations/ directory.

It performs the same operations as the administration interface:

  1. Generates XLIFF files from templates, existing translations, and the database
  2. Creates a ZIP archive
  3. Extracts the archive
  4. Copies XLIFF files to the theme's translations/ directory
  5. Cleans up temporary files

Usage

php bin/console prestashop:translations:export-theme <theme> <iso_code>

Arguments

  • theme: Theme name (directory name in themes/)
  • iso_code: Language ISO code (e.g., fr, en, es)

Examples

# Export French translations for the yourtheme theme
php bin/console prestashop:translations:export-theme yourtheme fr

# Export English translations
php bin/console prestashop:translations:export-theme yourtheme en

Result

XLIFF files will be copied to themes/<theme>/translations/<locale>/:

  • themes/yourtheme/translations/fr-FR/ShopThemeYourtheme.fr-FR.xlf
  • themes/yourtheme/translations/fr-FR/ShopThemeActions.fr-FR.xlf
  • themes/yourtheme/translations/fr-FR/ShopThemeCheckout.fr-FR.xlf
  • etc.

Note: This command uses exactly the same process as the administration interface (route /prestashop/improve/international/translations/export), ensuring full compatibility with manual exports.

These files can then be versioned with the theme to distribute translations.

Import Theme Translations

This command allows you to import theme translations from XLIFF files to the database.

It performs the same operations as the administration interface:

  1. Finds and parses XLIFF files in the theme's translations/ directory
  2. Parses each XLIFF file using Symfony's XliffFileLoader
  3. Extracts the domain from the filename (e.g., ShopThemeGlobal.fr-FR.xlf → ShopThemeGlobal)
  4. Saves each translation to the database with the theme name
  5. Updates existing translations or creates new ones as needed

Usage

php bin/console prestashop:translations:import-theme <theme> <iso_code>

Arguments

  • theme: Theme name (directory name in themes/)
  • iso_code: Language ISO code (e.g., fr, en, es)

Examples

# Import French translations for the yourtheme theme
php bin/console prestashop:translations:import-theme yourtheme fr

# Import English translations
php bin/console prestashop:translations:import-theme yourtheme en

Result

Translations will be imported into the database with the theme name.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AFL-3.0
  • 更新时间: 2026-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固