Gemini AI Polylang Translator (v3.1 - Full Sync)
Free AI Translator for WordPress using Google Gemini. Auto-translates Pages, Posts, and Rank Math SEO data (titles, slugs, meta). Fully compatible with Polylang. A free, open-source alternative to paid translation plugins like WPML.
by Vasyl (Vreel.xyz) · github.com/vreelxyz/wordpress-auto-translates-ai
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/vreelxyz/wordpress-auto-translates-ai/archive/refs/heads/main.zip🚀 Free AI WordPress Translator (Google Gemini + Polylang + RankMath)
Stop paying $189/year for premium translation plugins.
This lightweight script automates your WordPress & WooCommerce localization using the powerful Google Gemini AI (Free API). It seamlessly integrates with Polylang and Rank Math SEO to translate not just content, but also technical SEO data.
✨ Key Features
- 💰 100% Free API: Uses Google Gemini Free Tier (no credit card required for basic usage).
- 🛒 WooCommerce Ready: Automatically syncs Prices, Stock Status, SKUs, and Attributes across languages.
- seo Rank Math Integration: Translates SEO Titles, Meta Descriptions, and Focus Keywords.
- 🔗 Smart Slugs: Generates SEO-friendly Latin slugs (URLs) for translated pages automatically.
- 🌍 Bulk Translation: Supports Pages, Posts, and Products.
- ⚡ No Bloat: Lightweight PHP script. No heavy plugin overhead.
🧠 Under the Hood: AI Model
This tool is configured to use Google's gemini-flash-latest model via the API endpoint:
https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-latest:generateContent
Why this model?
We selected gemini-flash-latest because it offers the perfect balance for bulk translations:
- ✅ High Quality: Excellent understanding of context and nuances (comparable to GPT-4).
- ✅ Speed: Extremely fast processing time.
- ✅ Free Tier: Generous free limits allow you to translate hundreds of products without hitting the quota or paying a cent.
📸 Screenshots
🛠️ Requirements
- Google Gemini API Key (Get it for free here).
- Polylang (Free version is enough).
- Rank Math SEO (Free version is enough).
🌍 Supported Languages (19+)
The script comes pre-configured with support for 19 major global languages. You can easily add more in the code if needed.
| 🇺🇸 English | 🇪🇸 Spanish | 🇫🇷 French |
| 🇵🇹 Portuguese | 🇮🇹 Italian | 🇵🇱 Polish |
| 🇨🇿 Czech | 🇷🇺 Russian | 🇺🇦 Ukrainian |
| 🇨🇳 Chinese (CN) | 🇯🇵 Japanese | 🇰🇷 Korean |
| 🇸🇦 Arabic | 🇹🇷 Turkish | 🇳🇱 Dutch |
| 🇸🇪 Swedish | 🇮🇩 Indonesian | 🇻🇳 Vietnamese |
| 🇩🇪 German |
🚀 Installation
- Open your theme's
functions.phpfile (or use a plugin like WPCode). - Copy the code from
Auto-translates.phpin this repository. - Paste it into your
functions.php. - Configuration:
- Navigate to any Post or Product edit screen.
- Find the "AI Translator" metabox in the sidebar.
- Enter your Gemini API Key.
- Select target languages and click Run.
☕ Support the Project
I am a solo developer building tools to save you money. If this script saved you a subscription fee today, consider buying me a coffee!
Check out my other projects at Vreel.xyz.
🤝 Contributing & Feedback
This is an open-source project, and I want to keep the code fresh and working with the latest WordPress versions.
- Found a bug?
- Have a suggestion for a new language?
- Code improvement?
Please Open an Issue! I welcome all feedback to help maintain this tool for the community.
📄 License
Distributed under the MIT License. See LICENSE for more information.
