AI Site Translator Pro (v3.4.1)
AI Site Translator Pro - WordPress Plugin
by elfnon inc. · github.com/c0derman/ai-site-translator-pro-3
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/c0derman/ai-site-translator-pro-3/archive/refs/heads/main.zipAI Site Translator Pro v3.4.0
Professional WordPress translation plugin with AI-powered Arabic to English translation.
Features
- AI-Powered Translation - Uses OpenRouter API with GPT-4o, GPT-4o-mini, Claude, Gemini, etc.
- Auto-Complete Translation - Smart detection and translation of Arabic content
- Background Processing - WP-Cron based non-blocking bulk translation
- ACF Support - Full Advanced Custom Fields integration (Repeater, Flexible, Groups)
- SEO Integration - Rank Math & Yoast SEO field translation
- Elementor Support - Translate page builder content
- WooCommerce Compatible - Translate products and variations
- Backup System - Automatic backups with one-click restore
- Translation Memory - Smart caching to reduce API costs
- Glossary - Custom term translations
Requirements
- WordPress 6.0+
- PHP 8.0+
- MySQL 5.7+
- OpenRouter API Key
Installation
- Upload plugin to
/wp-content/plugins/ - Activate through WordPress admin
- Go to AI Translator in admin menu
- Enter your OpenRouter API key in Settings
- Start translating
Configuration
Create config.php from config-example.php:
define('ASTP_API_KEY', 'your-openrouter-api-key');
define('ASTP_API_BASE_URL', 'https://openrouter.ai/api/v1/chat/completions');
Or configure via Settings page in WordPress admin.
Usage
Single Post Translation
- Go to AI Translator
- Select a post from the list
- Click "ترجمة" (Translate)
Bulk Translation
- Go to AI Translator → Batch Jobs
- Select post types to translate
- Start batch job
- Monitor progress in real-time
Settings
- API Key - Your OpenRouter API key
- Model - AI model to use (default: gpt-4o-mini)
- Batch Size - Posts per batch (default: 5)
- Glossary - Custom term translations
Architecture
/ - Plugin root
├── ai-site-translator-pro.php - Main plugin file
├── config.php - API configuration
├── assets/ - CSS and JS files
├── includes/ - PHP classes
│ ├── class-admin-interface.php - Admin UI
│ ├── class-ajax-handler.php - AJAX endpoints
│ ├── class-api-client.php - OpenRouter API
│ ├── class-auto-complete-translator.php - Main translator
│ ├── class-background-translator.php - WP-Cron processor
│ ├── class-backup-system.php - Backup/restore
│ ├── class-acf-*.php - ACF handlers
│ ├── class-unified-seo-handler.php - SEO translation
│ ├── class-elementor-translator.php - Elementor support
│ └── ... - Other utilities
└── languages/ - Translation files
Key Classes
| Class | Purpose |
|---|---|
AI_Site_Translator_Pro_Auto_Complete_Translator |
Main translation engine |
AI_Site_Translator_Pro_Background_Translator |
Background processing |
AI_Site_Translator_Pro_API_Client |
OpenRouter API communication |
AI_Site_Translator_Pro_ACF_Handler |
ACF fields translation |
AI_Site_Translator_Pro_Unified_SEO_Handler |
SEO fields translation |
AI_Site_Translator_Pro_Backup_System |
Backup and restore |
AI_Site_Translator_Pro_Glossary |
Custom term translations |
Database Tables
| Table | Purpose |
|---|---|
astp_backups |
Content backups before translation |
ai_pro_translator_log_v3 |
Translation logs |
ai_pro_translator_cache_v3 |
Translation memory cache |
ai_pro_translator_jobs_v3 |
Batch job queue |
Security
- ✅ Nonce verification on all AJAX requests
- ✅ Prepared SQL statements (no SQL injection)
- ✅ Input sanitization and validation
- ✅ Output escaping
- ✅ Capability checks (manage_options)
Troubleshooting
Translation Stuck
- Check WP-Cron is running
- View logs in AI Translator → Logs
- Clear translation cache
API Errors
- Verify API key is correct
- Check OpenRouter account balance
- Review error logs
Missing Fields
- Ensure ACF plugin is active
- Check field permissions
- Review debug.log
Debug Mode
Add to wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
Changelog
v3.4.0 (2025-12)
- Added auto-complete translator
- Improved backup system (title-based detection)
- Enhanced ACF support for nested fields
- Performance optimizations
- Security improvements
v3.3.0
- Added bulk translation with background processing
- Improved SEO fields support
- Added glossary feature
v3.2.0
- Added Elementor support
- WooCommerce compatibility
- Added backup system
v3.1.0
- Initial release
License
GPLv2 or later
Author
elfnon inc.