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
.mofiles
Architecture
- Hooks into
gettext,gettext_with_context, andngettextfilters - 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.