GoBuildWP

LocalizationPro

Weglot MCP: stage settings locally, publish them to the cloud

Weglot's configuration lives in its cloud project, not in WordPress, and a Weglot MCP integration that trusted the local option would report a translating site as unconfigured. GoBuildWP Pro reads the settings actually in force, stores each change as a pending edit, and only changes what visitors see when the edit is published to the Weglot cloud. Translations themselves stay on the Weglot dashboard.

AI clientyour-site.comVerify site policy

Add German, and keep everything under /checkout in the original language.

  1. wppilot/weglot-check-setupRead

    Needs cloud_state ok; it also returns the plan and its destination-language limit.

  2. wppilot/weglot-list-languagesRead

    Looks up the code Weglot expects for German, de.

  3. wppilot/weglot-add-destination-languageWrite

    Stores de as a pending edit and returns cloud_sync_pending: true; visitors see nothing yet.

  4. wppilot/weglot-add-exclude-urlWrite

    Appends /checkout with the START_WITH match type, also pending.

  5. wppilot/weglot-push-options-to-cloudConfirm first

    Sends only the pending keys; Weglot merges them server-side, leaving the rest of the project untouched.

Proposed sequence from source declarations; not a recorded task or proof of client compatibility. Inspect saved state and browser or provider results separately.
Edition
Pro
Abilities
19
Requires
WordPress 6.9+, PHP 8.0+, Weglot 5.0+

Data model

A cloud project with a local cache

The WordPress option weglot-translate-v3 declares only a handful of Weglot's own keys, such as the menu switcher and custom URLs. Languages, exclusion rules, the engine and advanced toggles come from the Weglot API through the weglot_cache_cdn transient, and in Weglot's merge the cloud values come last and win. A site where someone only pasted an API key has an almost empty option and translates perfectly.

Two credentials sit in their own option rows: a public key that is enough for reads and a private key required for cloud writes. Translated URL slugs are the exception to the cloud rule: they are stored locally under custom_urls, because Weglot keeps project slugs on a separate resource the settings endpoint ignores.

Every read says where its answer came from. config_source weglot is the real configuration; local_fallback means Weglot could not be reached, so cloud-managed fields are unknown, not empty.

Limits

Weglot edits that behave differently

  • Test synthetic translated URLs after the exact local write or cloud publication. Check rendered text, response status, hreflang and canonical separately. A pending cloud change or saved configuration does not prove front-end translation quality or search eligibility.
  • Language, exclusion and switcher edits do nothing for visitors until weglot-push-options-to-cloud publishes them.
  • Changing the source language stages a local pending setting; it takes effect only after weglot-push-options-to-cloud. Publishing a different source language can disrupt existing translations, so verify the project's vendor behavior before changing it.
  • Setting or rotating the API key needs confirm, is checked against Weglot before it is saved, and is never copied into the change log.
  • Translated slugs apply on this site immediately but never reach the Weglot project: other installs and the dashboard will not have them, and a refresh from the cloud can discard them.
  • Translation text is edited on the Weglot dashboard only.

Worked example

Adding a language and keeping checkout untranslated

Expected outcome to verify on the installed stack; this sequence has not been recorded as a runtime test.

German appears in the switcher and checkout pages stay in the source language. None of it can be rolled back from the change log, because the project lives in Weglot's cloud; removing German again is a delete and another publish.

Set up credentials through an owner-controlled secure route before key operations. Changing the source language can invalidate existing translations. After the supported settings push, reread cloud settings and inspect the German and excluded checkout URLs.

  1. weglot-check-setup

    Needs cloud_state ok; it also returns the plan and its destination-language limit.

  2. weglot-list-languages

    Looks up the code Weglot expects for German, de.

  3. weglot-add-destination-language

    Stores de as a pending edit and returns cloud_sync_pending: true; visitors see nothing yet.

  4. weglot-add-exclude-url

    Appends /checkout with the START_WITH match type, also pending.

  5. weglot-push-options-to-cloud

    Sends only the pending keys; Weglot merges them server-side, leaving the rest of the project untouched.

Private previews, exclusion syntax and stale caches

Launching a Weglot language privately before visitors see it

A Weglot MCP request to add a language can go live in one step or be staged. weglot-add-destination-language takes enabled, true by default; set to false, the language is what Weglot's dashboard calls private, served to logged-in administrators as a preview and hidden from visitors. Like every language change, it still needs weglot-push-options-to-cloud before Weglot acts on it.

There is no ability that flips an existing language from private to public. Deleting and re-adding it would work but is the wrong tool, since the delete is destructive and drops the local translation cache. Make the switch on the Weglot dashboard once the preview has been reviewed, then run weglot-refresh-from-cloud so the site's copy of the settings matches. Before adding any language, weglot-get-status shows the plan's destination-language limit and word usage against the quota, which is worth reading because a new language is translated across the site's content.

Writing Weglot exclusion rules that match what you meant

weglot-add-exclude-url accepts Weglot's nine match modes: START_WITH, END_WITH, CONTAIN, IS_EXACTLY and MATCH_REGEX, plus a NOT_ version of the first four. A rule can apply to chosen languages only; with no languages listed it applies to all of them. START_WITH /checkout covers the checkout and its endpoints; IS_EXACTLY /checkout/ covers only that URL, so an order-received page would still be translated.

For regular expressions, write the pattern bare, such as ^/members(/|$). If it arrives wrapped in slashes, GoBuildWP strips them before saving, because Weglot adds its own delimiters and would otherwise read yours as literal characters and match nothing. Deletion is by position from weglot-list-exclude-urls, and positions renumber after every delete, so a batch of deletions means re-listing between calls.

Restyling the Weglot language switcher

weglot-edit-button-settings changes only the switcher fields you send and keeps the rest: whether the language shows as a full name or an ISO code, whether a label shows at all, a dropdown or a flat list, flags on or off, and the flag style, one of rectangle_mat, shiny, circle or square. Weglot's internal numbers for those styles are refused, so the agent has to use the names. custom_css replaces the switcher's bundled CSS, which makes it the one setting here worth reading first with weglot-get-settings section button and keeping a copy of.

Like language and exclusion edits, a switcher change waits for weglot-push-options-to-cloud. Check the result on a phone as well as a desktop, since a flat list with full names that fits a desktop header can wrap badly on a narrow screen. Changing the source language also stages a local pending edit. Publishing that edit can disrupt the project's translations; verify Weglot's behavior and a recovery plan before changing a live project's source language.

Stale Weglot settings: clear the cache or refresh from the cloud

When the site and the Weglot dashboard disagree, start with weglot-get-translation-cache-state, which reports whether the weglot_cache_cdn and weglot_slugs_cache transients exist and their timeout. weglot-clear-translation-cache deletes them so the next page load fetches fresh data; it is an ordinary write. weglot-refresh-from-cloud goes further, fetching the project settings and rewriting the local options with them, and is classed destructive because it can discard translated slugs that exist only on this site.

Credentials deserve the same care. weglot-set-api-key validates a key with Weglot before saving it and never writes it to the change log, but a key typed into an AI chat has passed through that client and its provider. Rotating the key in Weglot's own settings screen avoids that. Under Read Only the agent can still read settings, status, exclusions and slugs; on Production Safe the destructive Weglot abilities wait for confirm. The Weglot reference lists every field, and the Polylang page covers a plugin that stores translations in WordPress instead.

  • "Add Italian as a private language, publish the change, and tell me how to preview it."
  • "Read only: list our exclusion rules and say which ones would still let /checkout/order-received/ be translated."
  • "The switcher still shows Dutch after I removed it on the dashboard. Check the cache state first, then fix it."

Questions

Weglot questions

Why did a Weglot language change from my AI client not show on the site?

It is still a pending local edit. Weglot applies its cloud settings over the local option, so the change needs weglot-push-options-to-cloud to take effect.

Can an AI agent edit Weglot translations?

No. Translations are stored in the Weglot project and edited on its dashboard; these abilities cover configuration only.

Does the agent ever see my Weglot API key?

The setup check reports it masked, error messages redact it, and the change log never stores it.

How do I see my Weglot word usage?

weglot-get-status asks the Weglot cloud directly for the project's plan, language limit and word usage against its quota.

Where these facts come from

GoBuildWP behaviour is taken from the plugin source and the ability reference; third-party details from the vendor documentation below, checked by the GoBuildWP team.

Weglot is a separate product; no partnership or endorsement is implied.

Try it on Weglot in Read Only first