DEV Community

Cover image for Automating WPML Translation Jobs in WordPress with AI : CHATGPT,CLAUDE,GEMINI&GROK
NEXU WP
NEXU WP

Posted on

Automating WPML Translation Jobs in WordPress with AI : CHATGPT,CLAUDE,GEMINI&GROK

I built a WordPress addon that watches WPML translation jobs and processes them automatically through AI providers, so I do not have to manually copy content into external translators and paste it back into the site.

The problem was not multilingual setup itself, WPML already handles that well. The bottleneck was the translation workflow. Once posts, products, strings, or templates were marked for translation, they still needed repetitive manual work. That gets worse fast on content-heavy sites, especially when updates need to be retranslated across multiple languages.

My plugin plugs into WPML's job system and acts like an automated translator worker. When a job is assigned, it gets queued and processed in the background with WordPress cron. I added queue tracking, retries, status filters, and health checks so failed or stuck jobs can recover without manual cleanup.

Under the hood, the main challenge was reliability. Long articles and product descriptions can exceed model limits, so I split content into chunks at paragraph or sentence boundaries, send them to the selected AI provider, then reassemble the translated output in the original order. That keeps context intact while avoiding partial failures. I also preserve HTML structure so links, formatting, and layout survive translation.

I designed it to work with multiple providers and models, including ChatGPT, Claude, Gemini, and Grok, depending on what the site owner wants to use. The addon can also handle bulk retranslation for titles, taxonomies, WPML strings, and Elementor templates, which is useful when updating older content or switching models.

Another piece I cared about was visibility. I added a dashboard for queue state, job logs, completion stats, and retry actions, because background automation is only useful if I can see what it is doing and intervene when needed.

If you want to see the plugin itself, it is here: https://nexuwp.com/product/ai-translation-addon-for-wpml-openai-mistral-claude-grok/

The result is a simpler multilingual workflow: publish once, assign translation in WPML, and let the site process the rest in the background.

Top comments (0)