Skip to content
WordPress plugin that integrates a custom translation API to translate themes, plugins, and core strings programmaticall...

2023 · Creator

Custom Translation API for WordPress

WordPress plugin that integrates a custom translation API to translate themes, plugins, and core strings programmatically — bypasses the GlotPress workflow.

The challenge

GlotPress is the canonical WordPress translation pipeline but it doesn't fit teams using DeepL, Google Translate, or internal translation APIs. There's no programmatic way to push themes/plugins through a custom service.

The result

A WordPress plugin that integrates a custom translation API to translate themes, plugins, and core strings programmatically, with cache-aware batch translation and bypass of the GlotPress workflow.

Year
2023
Role
Creator
Stack
4 teches
Status
Published

Overview

A WordPress plugin that hooks into the translation loading pipeline to fetch strings from a custom translation API at runtime, replacing the default .mo file lookup.

Use Cases

  • Projects that maintain translations in a custom CMS and want WordPress to pull them dynamically
  • Multi-tenant setups where each client has their own translation set
  • Fast iteration on translations without regenerating .mo files

Architecture

  • Hooks into gettext, gettext_with_context, and ngettext filters
  • Caches API responses in a transient to avoid per-request API calls
  • Falls back to the default WordPress translation if the API returns nothing
  • Supports theme translations, plugin translations, and WP core strings

Tech

PHP, WordPress translation API, REST client, transient caching.

Share
𝕏 in

Related work

Building something similar?

Let's talk about your project.

Open to freelance engagements and consulting on Laravel, WordPress, and AI-powered systems.