nativemind / module-translation
Advanced translation module for Magento 2 with Google Translate and OpenAI integration
Installs: 0
Dependents: 0
Suggesters: 1
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Type:magento2-module
Requires
- php: >=7.4.0
- magento/framework: >=103.0.0
- magento/module-backend: >=102.0.0
- magento/module-catalog: >=104.0.0
- magento/module-config: >=101.2.0
- magento/module-eav: >=102.1.0
- magento/module-store: >=101.1.0
Suggests
- ext-curl: Required for API calls to translation services
- ext-json: Required for JSON handling
This package is not auto-updated.
Last update: 2025-09-22 14:09:30 UTC
README
Advanced translation module for Magento 2 with Google Translate and OpenAI GPT integration. Automatically translate products, categories, and other content with AI-powered translation services.
Features
🔄 Automatic Translation
- Products (names, descriptions, short descriptions)
- Categories (names and descriptions)
- Meta data (SEO titles and descriptions)
- Custom attributes
🌍 Multi-language Support
- 100+ languages supported
- Auto-detect source language
- Store-specific language configuration
- Fallback to original content
🤖 AI Translation Services
- Google Translate API: Fast and accurate translation
- OpenAI GPT: Contextual translation with semantic understanding
- Custom prompts: Control translation quality
- Batch processing: Bulk content translation
⚡ Performance
- Translation caching
- Asynchronous processing
- API rate limiting
- High-load optimization
🎛️ Management
- Complete admin panel
- Console commands for DevOps
- Statistics and monitoring
- Operation logging
Installation
Via Composer (Recommended)
composer require nativemind/module-translation php bin/magento module:enable NativeMind_Translation php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush
Manual Installation
# 1. Download and extract module mkdir -p app/code/NativeMind/Translation # Extract module files to app/code/NativeMind/Translation # 2. Enable module php bin/magento module:enable NativeMind_Translation php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush
Configuration
- Navigate to Stores → Configuration → NativeLang → Translation Settings
- Choose translation service (Google Translate or OpenAI)
- Add your API keys
- Configure attributes for translation
- Enable auto-translation
Google Translate Setup
# Get your Google Cloud API key from: # https://console.cloud.google.com/apis/credentials
OpenAI Setup
# Get your OpenAI API key from: # https://platform.openai.com/api-keys
Usage
Console Commands
# Translate all products php bin/magento nativemind:translate:products # Translate specific products php bin/magento nativemind:translate:products --product-ids="1,2,3" # Translate for specific stores php bin/magento nativemind:translate:products --store-ids="2,3,4" # Force translation (overwrite existing) php bin/magento nativemind:translate:products --force # Translate categories php bin/magento nativemind:translate:categories
PHP API
use NativeMind\Translation\Helper\Data as TranslationHelper; // Initialize $translationHelper = $this->translationHelper; // Simple translation $translated = $translationHelper->translateText( 'Hello World', 'ru_RU', $storeId ); // Translate array $data = ['title' => 'Product Title', 'description' => 'Product Description']; $translated = $translationHelper->translateArray($data, 'ru_RU');
REST API Endpoints
GET /rest/V1/nativelang/config # Get configuration
POST /rest/V1/nativelang/translate # Translate text
GET /rest/V1/nativelang/status/:id # Translation status
POST /rest/V1/nativelang/products/batch # Bulk translate products
Requirements
- PHP >= 7.4
- Magento >= 2.4.0
- ext-curl (for API calls)
- ext-json (for JSON handling)
Compatibility
Magento Version | Module Version |
---|---|
2.4.x | 1.0.x |
2.3.x | 1.0.x |
Support
- 📧 Email: contact@nativemind.net
- 🌐 Website: https://nativemind.net
- 📱 Telegram: @nativemind
- 🐛 Issues: GitHub Issues
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
v1.0.0
- Initial release
- Google Translate integration
- OpenAI GPT integration
- Product and category translation
- Admin panel interface
- Console commands
- REST API endpoints
⭐ If this project helps you, please give it a star! ⭐