承接 pablobae/module-simple-ai-translator 相关项目开发

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

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

pablobae/module-simple-ai-translator

Composer 安装命令:

composer require pablobae/module-simple-ai-translator

包简介

AI-powered translation module for Magento 2, enabling seamless integration with services like DeepL and ChatGPT for automated language translation. Provides configurable translation settings, language pairs, and model types for enhanced localization and multi-language store capabilities.

README 文档

README

SimpleAiTranslator is a Magento 2 extension that provides intelligent translation services by integrating with AI-powered APIs, including ChatGPT and DeepL, to offer easy and efficient multilingual content management.

Supported Magento version Latest Stable Version Ask DeepWiki License PHP Version Require

alt Simple AI extension for Adobe/Magento 2

Features

  • ChatGPT Integration: Translate text using OpenAI's powerful ChatGPT API.
  • DeepL Integration: Utilize DeepL for high-quality translation.
  • Admin Configuration: Fully configurable via Magento Admin (Stores > Configuration).
  • Unit Tests: Ensures reliable performance and quality.
  • Error handling and logging
  • Command-line interface for translations
  • Unit Tests: Ensures reliable performance and quality.

Requirements

  • Magento 2.4.x
  • PHP 8.1 or higher
  • DeepL API key (Free or Pro) and/or ChatGPT API key

Installation

Using Composer

composer require pablobae/module-simple-ai-translator
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean

Manual Installation

  1. Create the following directory in your Magento installation:
    app/code/Pablobae/SimpleAiTranslator
  2. Download the module and copy its contents to the above directory
  3. Enable the module:
    bin/magento module:enable Pablobae_SimpleAiTranslator
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento cache:clean

Configuration

Navigate to Stores > Configuration > Pablobae Extensions > Simple AI Translator

Getting API Keys

DeepL API Key

  1. Visit DeepL API Account
  2. Sign up for a DeepL API account (Free or Pro)
  3. Access your API key from the account dashboard
  4. Use api-free.deepl.com for Free API or api.deepl.com for Pro API

ChatGPT API Key

  1. Visit OpenAI Platform
  2. Create or log into your OpenAI account
  3. Navigate to API Keys section
  4. Create a new secret key
  5. Store the key securely as it won't be shown again

Configuration Options

General

  • Enable/Disable module
  • Select AI Engine (DeepL or ChatGPT)

DeepL Settings

  • API Key
  • API Domain (Free/Pro)
  • Default languages
  • Advanced translation options

ChatGPT Settings

  • API Key
  • Model selection
  • Temperature
  • Default languages
  • Request timeout

Usage

Admin Panel

The extension integrates with Magento's product management interface, allowing you to:

  • Translate product descriptions
  • Translate product attributes

Command Line

Use the CLI command for batch translations:

bin/magento pablobae:translate --text 'text to be translated' --language 'es'

Programmatic Usage

use Pablobae\SimpleAiTranslator\Service\Translator;

class YourClass {
    public function __construct(
        private readonly Translator $translator
    ) {}

    public function translate(string $text, ?string $storeId = null): string
    {
        return $this->translator->translate($text, $storeId);
    }
}

Supported Languages

DeepL API Languages

  • English (US & UK)
  • German
  • French
  • Spanish
  • Italian
  • Dutch
  • Polish
  • Portuguese (BR & PT)
  • Russian
  • Japanese
  • Chinese And more...

ChatGPT Languages

ChatGPT supports a broader range of languages including:

  • All major European languages
  • Asian languages (Chinese, Japanese, Korean)
  • Arabic
  • Hindi
  • African languages
  • Indigenous languages And many more, as ChatGPT can understand and generate content in most world languages.

Note: While ChatGPT supports more languages, DeepL typically provides more accurate translations for its supported language pairs.

Error Handling

The extension includes comprehensive error handling for:

  • Invalid/expired API keys
  • Rate limits and quota exceeded
  • Network timeouts
  • Invalid language codes
  • Malformed responses

Testing

Unit tests are provided to verify the core functionalities of the API clients (ChatGPT and DeepL). To run the tests:

  1. From the Magento root directory, execute:
    vendor/bin/phpunit -c dev/tests/unit/phpunit.xml

Make sure you have PHPUnit installed and configured for Magento.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and feature requests, please create an issue.

Alternatively, you can also join my Slack channel

License

License: GPL v3

This project is licensed under the GNU General Public License v3.0 or later. See the LICENSE file for details.

Credits

Developed by Pablo César Baenas Castelló (while testing AI agents)
www.pablobaenas.com | www.aradaen.com

pablobae/module-simple-ai-translator 适用场景与选型建议

pablobae/module-simple-ai-translator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 04 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「ecommerce」 「translator」 「localization」 「multi-language」 「ai」 「magento2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 pablobae/module-simple-ai-translator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pablobae/module-simple-ai-translator 我们能提供哪些服务?
定制开发 / 二次开发

基于 pablobae/module-simple-ai-translator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-04-22