定制 vanengers/prestashop-module-translation 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

vanengers/prestashop-module-translation

最新稳定版本:v1.4

Composer 安装命令:

composer require vanengers/prestashop-module-translation

包简介

Extract and translate into xlf files

README 文档

README

Extract from your PrestaShop module PHP, Twig and Smarty files and translate them with Deepl. Export them to Xlf files to be automatically imported at module installation. Uses languages locales from PrestaShop.

Requirements

You need to add a custom repository to your composer.json "repositories": [ { "type": "git", "url": "https://github.com/PrestaShopCorp/module-translation-tool.git", "symlink": false } ],

Install

composer require --dev vanengers/prestashop-module-translation

Usage

php vendor/bin/extract --extraction_dir=./path/to/ps_module --module_name=PS_MODULE --deepl_key=DEEPLAPIKEY --translate_to=de-DE,ru-RU,it-IT,es-ES,pl-PL --base_locale=en-GB

Optional Parameters

--translations_config_file=./path/to/translations_config.json
The saved translations.json file from a previous run.

--translations_xliff_dump_folder=./path/to/ps_module/translations
The files generated for PrestaShop, this should be inside the module/translations folder.

--deepl_key=DEEPLAPIKEY
A valid Deepl API key with usage leftover.

--formality=more
See https://www.deepl.com/nl/docs-api/translate-text for formality options This option does not apply to all languages.

--extraction_types=php,twig,smarty
Use this to extract only certain file types.

Remarks

--translate_to=de-DE,ru-RU,it-IT,es-ES,pl-PL
The DEEPL iso codes required format: ISO 3166-1 see: https://en.wikipedia.org/wiki/ISO_3166-1

Create your Deepl api key at DeepL

https://www.deepl.com/nl/pro-api?cta=header-pro-api

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-07