WP Manifestindependent plugin directory
manifest / i18n / mettranslate

MetTranslate WP

Translate English blog posts to Bahasa Melayu using the Gemini API, saved as a linked SEO post.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ismetdev/mettranslate/archive/refs/heads/main.zip
Updates itself. It ships its own updater (Plugin Update Checker), so new versions appear under Dashboard → Updates.

Translate WordPress blog posts between English and Bahasa Melayu Malaysia, saved as separate, SEO friendly linked posts. Choose your AI engine, translate one post from the editor, or translate a whole backlog in bulk.

Each translation is stored as its own WordPress post, with its own URL, paired to the original through post meta and joined with hreflang. This lets each language version rank on its own in search, which a toggle only approach cannot do.

Features

  • Choice of engine. Pick Google Gemini, Anthropic Claude, Groq, or a Mock test engine on the Translation Engine tab. Each keeps its own API key and model, and switching is instant.
  • Editable writing rules sent to the model on every request, so the output follows your house tone instead of a literal machine translation. Separate rule sets for each direction.
  • One click linked draft (English to Malay). An editor meta box creates a Malay draft from the current English post, copying the categories, tags, featured image, and excerpt.
  • Bulk translation (Malay to English). Translate your existing Malay posts into English in one run. English becomes the canonical version, the Malay post becomes its translation.
  • Resumable bulk runs. One button with a live progress bar processes posts in small batches, survives a page reload, skips posts that are already paired, and cannot run twice at once.
  • Review workflow. A list of translations waiting for a human check, and a two column review page with the original on the left, read only, and the editable translation on the right.
  • Two way linking between a post and its translation, ready for search engines.
  • Reciprocal hreflang tags on both posts, with editable language codes, default en and ms-MY.
  • Floating language switch on single posts, with four corner positions, optional flag and name, and a live preview in the settings.
  • Self updates from GitHub. New versions appear on the Plugins and Updates screens like any other plugin.
  • Safe uninstall. Deleting the plugin removes its settings and link meta, and keeps your posts and images.

Translation engines

MetTranslate uses one active engine at a time, chosen on the Translation Engine tab. Every engine is always available, and each stores its own key and model.

Engine Type Follows writing rules Free option
Google Gemini LLM Yes Free tier subject to Google limits
Anthropic Claude LLM Yes Paid API key, separate from Claude Pro
Groq LLM Yes Free tier subject to Groq limits
Mock none n/a Returns stub text, no key, for testing

The LLM engines follow your writing rules through a system instruction. Mock needs no key and no internet, so you can verify the whole flow before spending any quota.

How it works

English to Malay, one post at a time

  1. You write an English post as normal.
  2. In the editor, the MetTranslate box creates a linked Malay draft. The plugin sends the title, content, and excerpt to the engine together with your writing rules.
  3. You review and publish the Malay draft.

Malay to English, in bulk

  1. On the General tab, choose the tag that marks a post as Malay.
  2. On Bulk Translation, click the button. The plugin finds published Malay posts that are not yet paired and translates each into a new, published English post with a fresh URL. The Malay original keeps its URL and becomes the translation.
  3. Each new English post is flagged for review. Open it from the review list, edit if needed, then publish it as final.

Once both posts in a pair are published, the front end shows the language switch and prints the hreflang tags that connect them.

Requirements

  • WordPress 6.0 or newer
  • PHP 7.4 or newer
  • An API key for your chosen engine (Gemini, Claude, or Groq), or the Mock engine for testing with no key

Installation

  1. Download mettranslate.zip from the latest release.
  2. In WordPress, go to Plugins, then Add New, then Upload Plugin.
  3. Choose the zip, install, then activate.
  4. Open MetTranslate in the admin menu, go to the Translation Engine tab, choose an engine, and save its key.

Getting an API key

  • Gemini: Google AI Studio. Note that the free tier is subject to Google limits.
  • Claude: Anthropic Console. This is a paid API account, separate from a Claude Pro subscription.
  • Groq: Groq Console. Has a free tier subject to Groq limits.

You can either paste the key on the Translation Engine tab or, to keep it out of the database, define it in wp-config.php:

define( 'METTRANSLATE_GEMINI_API_KEY', 'your-key' );
define( 'METTRANSLATE_CLAUDE_API_KEY', 'your-key' );
define( 'METTRANSLATE_GROQ_API_KEY', 'your-key' );

A key set this way takes precedence, is shown read-only in the admin, and is never written to the database or included in an export.

Usage

  • Translate one post (English to Malay). Open an English post, save your changes, then click Create Malay draft in the MetTranslate box. Use Update Malay draft to refresh it later.
  • Translate in bulk (Malay to English). Set the Malay tag on the General tab, then click Translate all Malay posts on the Bulk Translation page. If your engine has a free tier limit, the run stops cleanly and resumes where it left off the next time you click.
  • Review. Open a flagged translation from the review list. The original is read only on the left, the translation is editable on the right. Save keeps it in the list, Publish marks it done. Delete and unpair removes a translation and frees its original to be redone.
  • Language switch. Configure it on the Language Switch tab, with a live preview. It appears on the front end only after both posts are published.

Settings

MetTranslate is a parent menu with two submenus, Settings and Bulk Translation. The Settings page is organised into tabs:

  • Dashboard for a quick overview, including the active engine.
  • General for the master switch, target language, and the Malay tag used by bulk detection.
  • Translation Rules for the writing rules in each direction, and the meta description length.
  • Language Switch for the floating switch and the hreflang codes, with a live preview.
  • Translation Engine for the engine choice, its key and model, and a live Test connection button.
  • Import / Export to move your configuration between sites.
  • Help / About for guidance.

Updates

The plugin updates itself from this repository through the bundled Plugin Update Checker.

  • When a new version is released, WordPress shows an update on the Plugins page and the Updates page. One click installs it.
  • To publish a new version, bump the version in mettranslate.php and readme.txt, push to main, then push a matching tag such as v0.7.0. A GitHub Action builds the zip and publishes the release.

Development

Working notes live in DOCS/STATE.md (layout, environment, release steps) and DOCS/DECISIONS.md (why past choices were made). Pull before editing on any machine.

Developed and tested locally in LocalWP before release.

mettranslate/
  mettranslate.php              Bootstrap: header, constants, update checker, hooks
  uninstall.php                 Removes settings and link meta on delete
  readme.txt                    WordPress readme, powers the update details popup
  includes/
    core/                       Loader, activator, deactivator
    admin/                      Settings, editor meta box, bulk translation, review list, tab views
    api/                        Engine dispatcher, HTTP helper, and the Gemini, Claude, Groq, and Mock adapters
    frontend/                   Language switch and hreflang
  assets/                       CSS, JS, flag SVGs
  libs/plugin-update-checker/   Bundled self update library
  languages/                    Translation files
  .github/workflows/            Release build on tag

Note: the LocalWP copy is a git checkout. Update it with git pull, not the dashboard update button, so the git history is kept. Use the dashboard update only on sites installed from the release zip.

Versioning

This project uses Major.Minor.Patch version numbers. Each release is a git tag such as v0.7.0, which triggers the build and publish workflow. The changelog lives in readme.txt and in the GitHub releases.

Uninstall

Deleting the plugin from the Plugins page removes the plugin settings and the small link meta it adds to posts. Your translated posts and their images are kept. Deactivating the plugin removes nothing.

Credits

License

GPL-2.0-or-later. See LICENSE.