PHPackages                             orangecat/translate-ai - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. orangecat/translate-ai

ActiveMagento2-module[Localization &amp; i18n](/categories/localization)

orangecat/translate-ai
======================

Translate AI module

1.0.0(5mo ago)241OSL-3.0LessPHP ^7.4 || ^8.1

Since Nov 30Pushed 5mo agoCompare

[ Source](https://github.com/olivertar/m2_translate_ai)[ Packagist](https://packagist.org/packages/orangecat/translate-ai)[ RSS](/packages/orangecat-translate-ai/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (1)

Orangecat TranslateAi
=====================

[](#orangecat-translateai)

Base module for AI-powered translations in Magento 2.

Overview
--------

[](#overview)

This module provides a generic, extensible framework for integrating AI translation services into Magento 2. It defines the interfaces and infrastructure needed to support multiple AI providers.

Architecture
------------

[](#architecture)

### Components

[](#components)

1. **TranslatorInterface** (`Api/TranslatorInterface.php`)

    - Contract that all AI providers must implement
    - Methods: `translate()`, `getCode()`, `getName()`, `isAvailable()`, `validateConfiguration()`
2. **TranslatorPool** (`Model/TranslatorPool.php`)

    - Manages all registered translation providers
    - Provides access to active translator from configuration
    - Returns list of available providers
3. **TranslationException** (`Exception/TranslationException.php`)

    - Custom exception for translation errors
4. **Configuration**

    - System configuration to select active provider
    - Located in: Stores &gt; Configuration &gt; Orangecat &gt; AI Translation

Creating a Translation Provider
-------------------------------

[](#creating-a-translation-provider)

To add a new AI provider, create a separate module that:

1. **Depends on this module** in `module.xml`:

```

```

2. **Implements TranslatorInterface**:

```
namespace Your\Module\Model;

use Orangecat\TranslateAi\Api\TranslatorInterface;

class Translator implements TranslatorInterface
{
    public function translate(string $text, string $sourceLocale, string $targetLocale): string
    {
        // Your translation logic here
    }

    public function getCode(): string
    {
        return 'your_code'; // e.g., 'openai', 'deepseek'
    }

    public function getName(): string
    {
        return 'Your Provider Name';
    }

    public function isAvailable(): bool
    {
        // Check if properly configured (e.g., API key exists)
    }

    public function validateConfiguration(): array
    {
        // Return array of error messages or empty array if valid
    }
}
```

3. **Registers in di.xml**:

```

            Your\Module\Model\Translator

```

Usage
-----

[](#usage)

```
// Get active translator from configuration
$translator = $this->translatorPool->getActiveTranslator();

// Translate text
$translatedText = $translator->translate(
    'Hello World',
    'en_US',
    'es_ES'
);
```

Configuration
-------------

[](#configuration)

Navigate to: **Stores &gt; Configuration &gt; Orangecat &gt; AI Translation**

- **Active Translation Provider**: Select which AI service to use

Each provider module may add its own configuration section with specific settings (API keys, models, etc.).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance70

Regular maintenance activity

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

169d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b0424a2b27fcf1f5c4362f5ab7f4fc78b56dfffe4897c4fd8177623b50fb953?d=identicon)[olivertar](/maintainers/olivertar)

---

Top Contributors

[![olivertar](https://avatars.githubusercontent.com/u/959440?v=4)](https://github.com/olivertar "olivertar (1 commits)")

### Embed Badge

![Health badge](/badges/orangecat-translate-ai/health.svg)

```
[![Health](https://phpackages.com/badges/orangecat-translate-ai/health.svg)](https://phpackages.com/packages/orangecat-translate-ai)
```

###  Alternatives

[splendidinternet/mage2-locale-de-de

German (Germany) language

861.0M2](/packages/splendidinternet-mage2-locale-de-de)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[bleez/magento2-pt_br

Magento2 pt\_BR - Traduzido por Agência Bleez

233.6k](/packages/bleez-magento2-pt-br)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
