Developers

Tranzly abilities reference

Tranzly registers its actions with the WordPress Abilities API. The same abilities are MCP tools on the site’s own server and REST routes under /wp-json/wp-abilities/v1. This page is generated from the plugin’s own registry.

User guide: connect an AI app

Endpoints

AbilityREST
MCP over HTTP (streamable)/wp-json/tranzly/v1/mcp
MCP over WP-CLI (standard input and output)wp mcp-adapter serve --server=tranzly --user=<login>
REST: list the abilities/wp-json/wp-abilities/v1/abilities?category=tranzly
REST: run an ability/wp-json/wp-abilities/v1/abilities/<name>/run (GET with ?input= for read-only abilities, POST {"input": {...}} otherwise)

Authentication and permissions

HTTP requests authenticate with a WordPress application password (HTTP Basic). Connecting to the MCP server needs the capability shown below; every ability then checks its own permission, per object. Read-only abilities run with GET and their input in the query string; the others with POST and a JSON body ‘{“input”: {…}}’.

a WordPress application password (HTTP) or --user (WP-CLI); the user needs the capability each ability names · Settings: Allow AI agents (MCP), on by default

All abilities

AbilityEditionRESTPermissionParameters
tranzly/bulk-translate
Starts background translation jobs for every original of the given content types (all translated types when none are given): the missing translations, the out-of-date ones, or all of them. Returns the jobs started, one per language.
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/bulk-translate/runedit_posts; publish_posts to publishlanguages array (required)
post_types array
scope string: missing, stale, all
engine string
publish boolean
tranzly/cancel-job
Stops a job; translations already made are kept.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/cancel-job/runmanage_options (the REST route’s own check)id string (required)
tranzly/check-quality
Has AI compare one translation with its original and score it, and stores the report on the translation. Uses the quality-check AI model set in Tranzly’s workflow settings.
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/check-quality/runedit_post on that translationid integer (required)
tranzly/connect-support
Connects this site to Zinn Digital® support (name, email, consent).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/connect-support/runmanage_options (the REST route’s own check)email string (required)
name string
consent boolean (required)
tranzly/correct-segments
Saves corrected segments of a translation (segments: key to text); corrected text is protected from re-translation.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/correct-segments/runedit_post (the REST route’s own check)id string (required)
segments object
texts object
tranzly/create-job
Starts a background job translating listed posts (posts) or a whole post type into languages (langs).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/create-job/runedit_posts (the REST route’s own check)posts array
post_type string
langs array (required)
engine string
status string: publish, draft
force boolean
tranzly/create-post-translation
Creates a draft translation of a post in a language (lang) to write by hand, without an engine.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/create-post-translation/runthe REST route’s own per-item permission checkid string (required)
lang string (required)
name string
slug string
description string
tranzly/create-term-translation
Creates a term’s translation in a language with a name, slug and description you give.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/create-term-translation/runthe REST route’s own per-item permission checkid string (required)
lang string (required)
name string
slug string
description string
tranzly/disconnect-support
Disconnects this site from support.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/disconnect-support/runmanage_options (the REST route’s own check)none
tranzly/estimate
Estimates characters and cost to translate posts (posts or post_type) into languages (langs) with an engine, before spending anything.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/estimate/runedit_posts (the REST route’s own check)posts array
post_type string
langs array (required)
engine string
tranzly/estimate-bulk
Estimates a whole-site translation in a language (post_types, scope, engine) before starting it.
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/estimate-bulk/runedit_posts (the REST route’s own check)post_types array
scope string: missing, stale, all
engine string
lang string (required)
after integer
tranzly/export-translation-file
Returns an XLIFF or CSV file (as text) with the originals and their translations in one language, for a translator or a translation agency: the given posts, or a page of up to 100 originals of a content type in a state (missing, stale, translated or all; repeat with after). The same file can be imported back once translated.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/export-translation-file/runedit_posts; each post is included only if the user may edit itlang string (required)
format string: xliff, csv
posts array
post_type string
state string: all, missing, stale, translated
after integer
tranzly/fix-status
Queues translation of every missing (or out-of-date) item in a language and post type.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/fix-status/runedit_posts (the REST route’s own check)post_type string
lang string (required)
state string (required): missing, stale, quality
tranzly/get-comments-setting
Returns whether comments are shared across languages or kept per language.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/get-comments-setting/runmoderate_comments (the REST route’s own check)none
tranzly/get-deepl-usage
Returns the characters used and the limit of the saved DeepL key this month.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-deepl-usage/runmanage_options (the REST route’s own check)none
tranzly/get-diagnostics
Returns the diagnostics a support ticket would carry: versions, active plugins, limits and recent errors.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-diagnostics/runmanage_options (the REST route’s own check)none
tranzly/get-display
Returns the language switcher and credit display options.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-display/runmanage_options (the REST route’s own check)none
tranzly/get-engine-settings
Returns the default and fallback engine, per-language engines and AI models, each engine’s state, the connected AI providers with their models, and this month’s spend.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-engine-settings/runmanage_options (the REST route’s own check)none
tranzly/get-glossary
Returns the words never translated, the fixed term translations and the tone per language.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/get-glossary/runmanage_optionsnone
tranzly/get-integrations
Lists the SEO, WooCommerce, page-builder and form plugins Tranzly supports and which are active here.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-integrations/runmanage_options (the REST route’s own check)none
tranzly/get-job
Returns one job’s progress and counts.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-job/runmanage_options (the REST route’s own check)id string (required)
tranzly/get-job-failures
Lists a job’s failed items with the reason for each.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-job-failures/runmanage_options (the REST route’s own check)id string (required)
tranzly/get-legacy-import
Returns the state and report of importing translations from Tranzly 2.x.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-legacy-import/runmanage_options (the REST route’s own check)none
tranzly/get-licence
Returns this site’s Tranzly plan, licence state, renewal date and what the plan includes.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-licence/runmanage_options (the REST route’s own check)none
tranzly/get-menus
Returns which menu each language shows in each menu location.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-menus/runedit_theme_options (the REST route’s own check)none
tranzly/get-post-group
Lists a post’s translation group: every language’s member with its title, status and edit link.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-post-group/runedit_post and edit_term (the REST route’s own check)id string (required)
tranzly/get-quality-report
Returns a translation’s AI quality report: score and the segments it flagged.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/get-quality-report/runedit_post (the REST route’s own check)id string (required)
tranzly/get-segments
Returns a translation’s segments beside the original’s, for review and correction.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-segments/runedit_post (the REST route’s own check)id string (required)
tranzly/get-shared-strings
Returns the theme and plugin texts (scope) in a language with their translations.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-shared-strings/runedit_theme_options (the REST route’s own check)lang string (required)
scope string: menus, site, templates, gettext.plugin-<slug>, gettext.theme-<slug>
tranzly/get-site-strings
Returns the site title, tagline and widget texts in a language.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-site-strings/runmanage_options (the REST route’s own check)lang string (required)
tranzly/get-support-connection
Says whether this site is connected to Zinn Digital® support, and as whom.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-support-connection/runmanage_options (the REST route’s own check)refresh boolean
tranzly/get-term-group
Lists a category’s or tag’s translation group.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-term-group/runedit_post and edit_term (the REST route’s own check)id string (required)
tranzly/get-urls
Returns how languages appear in addresses (folder, subdomain or domain), translated slugs and bases, and noindex for untranslated pages.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/get-urls/runmanage_options (the REST route’s own check)none
tranzly/get-workflow-settings
Returns auto-translation on publish and on update, review before publish, and the AI quality check’s threshold, provider and model.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/get-workflow-settings/runmanage_options (the REST route’s own check)none
tranzly/import-from-source
Imports the next page of translations from another multilingual plugin (mode: dry-run or run; cursor).
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/import-from-source/runmanage_options (the REST route’s own check)source string (required)
mode string: dry-run, run, undo
cursor string
tranzly/import-translation-file
Writes the next page of posts from an uploaded translation file (repeat with after until done).
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/import-translation-file/runedit_posts (the REST route’s own check)token string (required)
after integer
tranzly/link-post
Makes an existing post (target) the translation of this post in a language.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/link-post/runedit_post and edit_term (the REST route’s own check)id string (required)
lang string (required)
target integer (required)
tranzly/link-term
Makes an existing term (target) the translation of this term in a language.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/link-term/runedit_post and edit_term (the REST route’s own check)id string (required)
lang string (required)
target integer (required)
tranzly/list-engines
Lists the translation engines, whether each is set up, and which one is used when none is named.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/list-engines/runedit_postsnone
tranzly/list-import-sources
Lists WPML, Polylang and TranslatePress data found on this site that can be imported.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/list-import-sources/runmanage_options (the REST route’s own check)none
tranzly/list-jobs
Lists background translation jobs, newest first, with progress.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/list-jobs/runedit_posts (the REST route’s own check)none
tranzly/list-languages
Lists the site’s languages. The first one is the language the original content is written in.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/list-languages/runedit_postsnone
tranzly/list-status-items
Lists originals with their translation state in a language (state: missing, stale, current), page by page.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/list-status-items/runedit_posts (the REST route’s own check)post_type string
lang string (required)
state string: all, missing, stale, translated, human, machine, review, quality
after integer
tranzly/list-theme-strings
Lists the themes and plugins whose texts can be scanned for translation, and how many strings each has.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/list-theme-strings/runmanage_options (the REST route’s own check)none
tranzly/open-support-ticket
Files a support ticket (subject, message, kind, email), with this site’s diagnostics when the administrator agreed. It never creates a login or sends one.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/open-support-ticket/runmanage_options (the REST route’s own check)subject string (required)
message string (required)
kind string: help, bug, feedback, feature_request
email string
name string
diagnostics boolean
tranzly/record-support-consent
Records the administrator’s consent to send diagnostics with support tickets.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/record-support-consent/runmanage_options (the REST route’s own check)consent boolean (required)
tranzly/retry-job-item
Retries a failed item (action: retry, optionally with another engine) or marks it for translating by hand (action: by-hand).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/retry-job-item/runedit_post and manage_options (the REST route’s own check)item string (required)
action string (required)
engine string
tranzly/review-translation
Approves a translation (and publishes it when the original is published) or sends it back (decision, note).
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/review-translation/runedit_post (the REST route’s own check)id string (required)
decision string (required): approve, changes, pending
note string
tranzly/run-legacy-import
Runs the 2.x import: dry-run (report only), run, or undo.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/run-legacy-import/runmanage_options (the REST route’s own check)action string (required)
tranzly/scan-theme-strings
Scans the next page of a component’s PHP files for translatable texts (repeat with after until done).
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/scan-theme-strings/runmanage_options (the REST route’s own check)component string (required)
after integer
tranzly/schedule-quality-check
Schedules the AI quality check of the next page of a language’s translations (or the given posts).
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/schedule-quality-check/runedit_posts (the REST route’s own check)lang string (required)
post_type string
posts array
after integer
tranzly/seo-audit
Checks translations for missing SEO titles, descriptions, slugs and hreflang in a language, page by page.
ProGET /wp-json/wp-abilities/v1/abilities/tranzly/seo-audit/runmanage_options (the REST route’s own check)lang string (required)
after integer
tranzly/set-comments-setting
Shares comments across a post’s translations or keeps them per language (mode).
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/set-comments-setting/runmanage_options and moderate_comments (the REST route’s own check)mode string (required): off, show, translate
tranzly/set-engine-key
Saves the API key (and region for Microsoft) of DeepL, Google or Microsoft; empty removes it. Keys are stored encrypted and never returned.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/set-engine-key/runmanage_options (the REST route’s own check)engine string (required)
key string (required)
region string
tranzly/set-menus
Assigns a menu per language per location (map).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/set-menus/runedit_theme_options (the REST route’s own check)map object (required)
tranzly/set-protection
Protects a translation from being overwritten by the engine (protected: true), or unlocks it.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/set-protection/runedit_post (the REST route’s own check)id string (required)
protected boolean (required)
tranzly/set-shared-strings
Saves corrected translations of theme and plugin texts (strings); they become protected.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/set-shared-strings/runedit_theme_options (the REST route’s own check)lang string (required)
scope string: menus, site, templates, gettext.plugin-<slug>, gettext.theme-<slug>
strings object (required)
tranzly/set-site-string
Saves one site text (key) in a language, e.g. the site title or tagline.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/set-site-string/runedit_theme_options and manage_options (the REST route’s own check)lang string (required)
key string (required)
translation string (required)
tranzly/set-urls
Sets the address mode (mode), per-language domains, translated bases and segments, noindex_untranslated and slug suggestions.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/set-urls/runmanage_options (the REST route’s own check)mode string
segments object
domains object
bases object
suggest boolean
noindex_untranslated boolean
tranzly/start-trial
Starts the 14-day Tranzly Pro trial for this site (no payment needed).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/start-trial/runmanage_options (the REST route’s own check)none
tranzly/translate-media-field
Saves an image’s alt text, title or caption (field) in a language (lang).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/translate-media-field/runedit_post (the REST route’s own check)id string (required)
lang string (required)
field string (required): alt, caption, title
translation string (required)
tranzly/translate-post
Translates one post or page into one or more of the site’s languages with a translation engine, creating each translation or updating it. New translations are drafts unless publish is true. A translation a person edited is skipped unless force is true.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/translate-post/runmay translate that post (edit_post on it); edit_post on an existing translation; the type’s publish capability to publishid integer (required)
languages array (required)
engine string
publish boolean
force boolean
tranzly/translate-shared-strings
Translates the next page of untranslated theme and plugin texts in a language with the default engine (repeat with after until done).
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/translate-shared-strings/runedit_theme_options (the REST route’s own check)lang string (required)
scope string: menus, site, templates, gettext.plugin-<slug>, gettext.theme-<slug>
after integer
tranzly/translate-site
A guided workflow: the agent checks the languages and engine, estimates the cost, and translates what is missing, asking before it spends or publishes.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/translate-site/runedit_postslanguages string (required)
tranzly/translate-term
Translates one term (category, tag or product attribute) into a language (lang) with an engine, creating or updating its translation.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/translate-term/runthe REST route’s own per-item permission checkid string (required)
lang string (required)
engine string
force boolean
status string: publish, draft
tranzly/translation-status
With a post ID: each language’s translation of that post, whether it is out of date, and who wrote it. Without one: how much of the site is translated, per language.
FreeGET /wp-json/wp-abilities/v1/abilities/tranzly/translation-status/runedit_post on that post; edit_posts for the site summaryid integer
post_type string
tranzly/unlink-post
Takes a post out of its translation group; it keeps its language.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/unlink-post/runedit_post and edit_term (the REST route’s own check)id string (required)
tranzly/unlink-term
Takes a term out of its translation group.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/unlink-term/runedit_post and edit_term (the REST route’s own check)id string (required)
tranzly/update-display
Changes the switcher (style, flags, names, placement) and the credit line.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/update-display/runmanage_options (the REST route’s own check)switcher object
credit boolean
tranzly/update-engine-settings
Sets the default engine, a fallback engine, per-language engines and per-language AI models (default, fallback, per_lang, models, caps). Everything but the default engine is Pro.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/update-engine-settings/runmanage_options (the REST route’s own check)default string
per_lang object
fallback array
caps object
models object
tranzly/update-glossary
Replaces the parts of the glossary you send (words never translated, term translations, tone); parts you leave out are kept. Used by every engine from the next translation on.
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/update-glossary/runmanage_optionsdnt array
terms object
tone object
tranzly/update-settings
Sets the site’s languages (languages: list of code and name; the first is the original language), the front-end class prefix, and whether AI agents (MCP) are allowed.
FreePOST /wp-json/wp-abilities/v1/abilities/tranzly/update-settings/runmanage_options (the REST route’s own check)prefix string
mcp boolean
languages array
tranzly/update-workflow-settings
Sets on_update (off, stale, translate), on_publish, review, quality_threshold, quality_provider and quality_model.
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/update-workflow-settings/runmanage_options (the REST route’s own check)on_update string: off, stale, translate
on_publish boolean
review boolean
quality_threshold integer
quality_provider string
quality_model string
tranzly/upload-translation-file
Uploads a Tranzly XLIFF or CSV file (content, filename) translated elsewhere; answers a token that identifies the upload for the import.
ProPOST /wp-json/wp-abilities/v1/abilities/tranzly/upload-translation-file/runedit_posts (the REST route’s own check)content string (required)
filename string (required)

Generated from the plugin’s abilities.json, which is itself generated from a running site; a test fails when the two disagree.

WP-CLI commands

Run these on the server with WP-CLI. Each command checks the same permissions as the plugin’s screens; the examples are taken from the plugin’s own help text.

CommandWhat it doesEdition
wp tranzly create <id> [--term]
wp tranzly create 42 --lang=de_DE --user=admin
Create a draft translation of a post (or term), linked to it.Free
wp tranzly enginesList the translation engines.Free
wp tranzly jobs <action> [<id>...] [--lang=<codes>] [--post-type=<type>] [--engine=<id>] [--publish] [--force] [--format=<format>]
wp tranzly jobs create --lang=de,fr --post-type=page --user=admin
wp tranzly jobs status 12
wp tranzly jobs failures 12
wp tranzly jobs retry 345 --engine=deepl
wp tranzly jobs retry-failed 12
wp tranzly jobs run 12 # work the job here instead of waiting for the queue runner
Background translation jobs.Free
wp tranzly legacy <action> [--format=<format>]
wp tranzly legacy dry-run
wp tranzly legacy run
wp tranzly legacy undo
Show, dry-run, run or undo the import of a legacy Tranzly (2.x) site’s translations.Free
wp tranzly link <source> <target> [--term]Link an existing post (or term) as the translation of another.Free
wp tranzly network <action> [--languages=<codes>]
wp tranzly network setup
wp tranzly network languages --languages=en_US,de_DE,fr_FR
Multisite (Agency): set up every site of the network, or set the languages new sites start with.Free
wp tranzly translate [<id>...] [--post-type=<type>] [--engine=<id>] [--force] [--publish] [--dry-run]
wp tranzly translate --lang=de --post-type=page --user=admin
wp tranzly translate 42 43 --lang=de_DE,fr_FR --engine=deepl --user=admin
Translate posts with an engine.Free
wp tranzly translations <id> [--term] [--format=<format>]List a post’s (or term’s) translations.Free

PHP functions

Functions themes and other plugins can call. Check function_exists() first, so your code keeps working while the plugin is inactive.

FunctionWhat it doesEdition
icl_object_id( $id, $type = 'post', $return_original_if_missing = false, $lang = null )WPML: an object’s translation.Pro
pll__( $text )Polylang: a registered string, translated. Tranzly translates theme strings through WordPress’s own gettext, so the string comes back as given.Pro
pll_current_language( $field = 'slug' )Polylang: the current language.Pro
pll_default_language( $field = 'slug' )Polylang: the default language.Pro
pll_e( $text )Polylang: echo a registered string, escaped.Pro
pll_get_post( $post_id, $lang = null )Polylang: a post’s translation.Pro
pll_get_post_language( $post_id, $field = 'slug' )Polylang: a post’s language.Pro
pll_get_post_translations( $post_id )Polylang: every translation of a post, slug => ID.Pro
pll_get_term( $term_id, $lang = null )Polylang: a term’s translation.Pro
pll_get_term_language( $term_id, $field = 'slug' )Polylang: a term’s language.Pro
pll_get_term_translations( $term_id )Polylang: every translation of a term, slug => ID.Pro
pll_home_url( $lang = '' )Polylang: the home URL in a language.Pro
pll_is_translated_post_type( $post_type )Polylang: is this post type translated?Pro
pll_is_translated_taxonomy( $taxonomy )Polylang: is this taxonomy translated?Pro
pll_languages_list( $args = array( )Polylang: the languages.Pro
pll_register_string()Polylang: register a string (accepted and ignored — see pll__()).Pro
pll_the_languages( $args = array( )Polylang: the language switcher. `raw` returns Polylang’s array (slug => details); otherwise a `<li>` list in Polylang’s markup, echoed unless `echo` is 0. Honours `hide_current`, `hide_if_no_translation` and `display_names_as` (`name` or `slug`). A `dropdown` is rendered as the list: Tranzly’s own switcher block/widget is the place for a dropdown.Pro
pll_translate_string( $text )Polylang: a registered string in a language. As pll__(), the string comes back as given.Pro
tranzly_compat_field( string $code, string $field )One field of a language, in Polylang’s vocabulary.Pro
tranzly_current_language(): stringThe language of the current request (a WordPress locale code such as `fr_FR`).Free
tranzly_default_language(): stringThe default language: the first listed.Free
tranzly_get_engines(): arrayThe engines available: id => name.Free
tranzly_get_post_language( int $post_id ): stringThe language a post is written in.Free
tranzly_get_term_language( int $term_id ): stringThe language a term is written in.Free
tranzly_get_term_translation( int $term_id, string $lang ): ?intA term’s translation into a language, or null.Free
tranzly_get_term_translations( int $term_id ): arrayEvery version of a term: language code => term ID.Free
tranzly_get_translation( int $post_id, string $lang ): ?intThe ID of a post’s translation into a language, or null when there is none. Returns the post’s own ID when it is already written in that language.Free
tranzly_get_translations( int $post_id ): arrayEvery version of a post, the post itself included: language code => post ID. A post with no translations returns just itself in its language.Free
tranzly_language_switcher( array $args = array( )A language switcher’s HTML, for any theme, builder or plugin (T5). Page Builder Sandwich’s element calls it; so can yours. Empty when fewer than two languages exist.Free
tranzly_language_url( string $lang, ?string $url = null ): stringA URL showing the given language.Free
tranzly_languages(): arrayThe site’s languages, default first.Free
tranzly_register_engine( Engine $engine )Add a translation engine. Call it on `tranzly_register_engines`, or any time before the first translation of the request.Free
tranzly_restore_language(): boolUndo the last tranzly_switch_language().Free
tranzly_switch_language( string $lang ): boolMake code run in another language until tranzly_restore_language(): the current language and WordPress’s own translations both switch. Nests like switch_to_blog():Free
tranzly_translatable_attributes( string $block_name ): arrayThe attribute names Tranzly translates for a block type: `role: content` in its block.json, adjusted by the `tranzly_translatable_attributes` filter.Free
tranzly_translate_post( int $post_id, string $lang, string $engine = '', array $args = array( )Translate a post into a language with an engine, as the current user (their permissions apply).Free

Actions and filters

Every hook the plugin offers, with the description from its source code. Filters change a value; actions let you run code at a moment; entry points are actions you fire to ask the plugin to do something.

HookKindWhat it doesParametersEdition
tranzly_admin_barActionFires after the Translations admin-bar menu is built (the Pro visual editor adds its “Translate on this page” item here).\WP_Admin_Bar $bar
int $id
Free
tranzly_admin_dataFilterFilters the data the admin app boots with. The premium layer uses it to report its edition; nothing sensitive belongs here, because it is printed into the page.noneFree
tranzly_ai_modelFilterFilters the AI provider and model that translate into a language. Free: the provider and model chosen for the `translate` task, for every language. Tranzly Pro: the language’s own choice, else the “all other languages” choice.string $targetFree
tranzly_ai_providers_in_useFilterFilters the AI providers chosen for particular languages. None in the free plugin: every language uses the provider and model chosen for the `translate` task. Tranzly Pro lists the providers of its per-language models.noneFree
tranzly_content_before_rebuildFilterFilters the source content just before translated segments are written into it, per language (the Pro per-language image swap uses it).string $content
string $lang
Free
tranzly_copy_meta_keysFilterFilters the meta keys copied from a post onto its new translation. Nothing else is copied.int $source_idFree
tranzly_deepl_hostFilterFilters the DeepL API host (a proxy, or a test double).string $host
string $key
Free
tranzly_deepl_price_per_millionFilterFilters DeepL’s price per million characters in US dollars.float $priceFree
tranzly_default_engineFilterFilters the id of the engine used when none is named.string $idFree
tranzly_engine_capFilterFilters an engine’s monthly cap in US dollars: none in the free plugin.float|null $cap
string $engine
Free
tranzly_engine_chainFilterFilters the engines to try for a language, in order. Free: the default engine. The premium layer adds the language’s own engine and the fallback list.string $lang
string $first
Free
tranzly_engine_optionsFilterFilters the options passed to the engine (do-not-translate list, glossary, formality, instructions).string $target
Engine $engine
Free
tranzly_engine_settings_saveFilterSaves the per-language engines and AI models, the fallback list and the monthly caps. Only the premium layer answers (WordPress.org guideline 5: no Pro behaviour in the free plugin).noneFree
tranzly_frontend_prefixFilterFilters the neutral front-end class prefix.string $prefixFree
tranzly_fs_loadedActionFires once the licensing SDK has loaded (in the main file, before any Tranzly code). Hook here to talk to `tranzly_fs()`.noneFree
tranzly_glossary_optionsFilterFilters the engine options for a target language: the do-not-translate list, plus the glossary and tone when the premium layer adds them.string $langFree
tranzly_glossary_saveFilterSaves preferred translations and tone per language. Only the premium layer answers (WordPress.org guideline 5: no Pro behaviour in the free plugin).noneFree
tranzly_google_price_per_millionFilterFilters Google Cloud Translation’s price per million characters, US dollars.float $pricePro
tranzly_install_language_packsFilterWhether Tranzly installs the WordPress, theme and plugin language packs of a language added to the site (so WordPress’s and WooCommerce’s own words appear translated). On by default.bool $installFree
tranzly_integration_availableFilterFilters whether an integration runs when its plugin is not detected — for content a builder left behind after it was switched off, or a plugin loaded in an unusual way.bool $on
string $id
Free
tranzly_integrationsFilterFilters the integrations Tranzly runs. Add an `Integration` subclass to support another plugin.noneFree
tranzly_is_proFilterFilters whether the premium layer is running. Only the premium layer answers it.bool $proFree
tranzly_job_createdActionFires after a translation job is created.int $job
int $items
Free
tranzly_job_finishedActionFires when a translation job has no work left.int $job_idFree
tranzly_kit_api_baseFilterFilters the Zinn Digital® API base the support screens call.string $baseFree
tranzly_kit_diagnosticsFilterFilters the diagnostics before the site owner sees them. A plugin adds its own facts under `extra`. ⛔ This runs BEFORE the preview, never between the preview and the send.noneFree
tranzly_kit_footprint_freeFilterFilters whether this site is footprint-free, so Zinn® Ads is never promoted on it.bool $footprint_freeFree
tranzly_kit_promotionsFilterFilters the promotion registry before it is resolved. Add a row to promote another product: `id`, `kind` (hosting|marketplace|platform|plugin|bundle|membership|ads), `slot` (promo|cross-sell), and `url` or (for a plugin) `name`, `site`, `main_files`.noneFree
tranzly_kit_tierFilterFilters the plan tier the kit reports for this plugin (tests and staging; the licence decides in production).string $tierFree
tranzly_localize_linksFilterFilters whether Tranzly points this page’s internal links at their translations.bool $localize
string $lang
Free
tranzly_memory_enabledFilterFilters whether translation memory is used.bool $onPro
tranzly_microsoft_price_per_millionFilterFilters Microsoft Translator’s price per million characters, US dollars.float $pricePro
tranzly_network_enabledFilterFilters whether the multisite network layer is on.bool $agencyFree
tranzly_pbs_internal_post_typesFilterFilters the Page Builder Sandwich post types Tranzly leaves alone.noneFree
tranzly_post_segmentsFilterFilters the segments of a post sent to the engine. Key => `text` + `format` (`text` or `html`). The block-aware parser and integrations add, split or replace segments here, and write them back on `tranzly_translated_post_fields`.\WP_Post $postFree
tranzly_post_translatedActionFires after an engine translated a post (or a person’s file or an import wrote one).int $target
int $source_id
string $code
string $engine
Free
tranzly_post_translation_createdActionFires after Tranzly creates a post translation.int $new_id
int $source_id
string $code
Free
tranzly_post_typesFilterFilters the post types Tranzly translates.noneFree
tranzly_pre_current_languageFilterShort-circuits the current language: return a language code to use it. This is how tranzly_switch_language() works; return null to let Tranzly decide.string|null $langFree
tranzly_query_varFilterFilters the query variable that selects the language.string $varFree
tranzly_queue_lease_secondsFilterFilters the lease on a claimed item: after it, a worker that died mid-item gives the item back to the others. Longer than the slowest single translation.int $secondsFree
tranzly_queue_worker_secondsFilterFilters how long one worker runs before handing over, in seconds.int $secondsFree
tranzly_queue_workersFilterFilters how many workers one job runs at once. A bound on WORKERS, to be gentle with the translation service; never a bound on how many items get done.int $workers
int $job_id
Free
tranzly_rate_source_FilterRates from another source (see `tranzly_rate_sources`).nonePro
tranzly_rate_sourcesFilterFilters the exchange-rate sources. Add one with a `tranzly_rate_source_<id>` filter that returns `[ code => rate against its reference ]`, or a WP_Error.nonePro
tranzly_register_enginesActionRegister translation engines. Call `$registry->add( new Your_Engine() )`.Registry $registryFree
tranzly_relations_changedActionFires after the translation links of objects changed: linked, unlinked, moved to another language or removed. Fires once per group touched, so a single link may fire it twice.string $type
array<int> $ids
Free
tranzly_robots_meta_keysFilterFilters the post meta keys that hold robots settings; each follows the original onto its translations.noneFree
tranzly_shared_string_scopesFilterFilters the shared-text scopes (lane L06, T6: integrations add `woocommerce`, `forms` and `theme`; their texts come in on `tranzly_shared_strings`).noneFree
tranzly_shared_stringsFilterFilters the shared texts Tranzly translates as strings, per scope. The Pro layer adds block templates, template parts and patterns to `templates`.string $scopeFree
tranzly_shared_strings_coveredFilterFilters the texts of a shared-text scope that a language pack translates for a language. The Pro layer reports the theme’s and core’s registered patterns for `templates`.string $scope
string $lang
Free
tranzly_source_changedActionFires when an original’s translatable content changed, so its translations are now out of date.int $post_id
string $now
string $before
Free
tranzly_source_meta_keysFilterFilters the meta keys whose change makes a page’s translations out of date. Integrations add the keys they translate (builder data, SEO fields, custom fields).int $post_idFree
tranzly_source_publishedActionFires once when an original is first published (after its meta is saved).int $post_idFree
tranzly_style_rules_enabledFilterWhether Tranzly applies the language’s WordPress.org translation-team style rules (quotation marks, spacing around punctuation, apostrophes, ellipsis, Japanese spacing, pronouns of address) to each new translation. On by default.bool $enabled
string $locale
Free
tranzly_taxonomiesFilterFilters the taxonomies Tranzly translates.noneFree
tranzly_term_segmentsFilterFilters the segments of a term sent to the engine (`name`, `description`, plus whatever integrations add: SEO titles, custom fields). Write added ones on `tranzly_term_translated`.\WP_Term $termFree
tranzly_term_translatedActionFires after an engine translated a term, with every translated segment (integrations write the segments they added on `tranzly_term_segments`).int $target
int $term_id
string $code
Free
tranzly_term_translation_createdActionFires after Tranzly creates a term translation.int $new_id
int $term_id
string $code
Free
tranzly_translatable_attributesFilterFilters the attributes Tranzly translates for a block type.string $block_nameFree
tranzly_translate_stringFilterFilters one translatable string into a language.string $value
string $code
array $context
Free
tranzly_translated_post_fieldsFilterFilters the post fields written into a translation, after the engine ran. Integrations that added their own segments (custom fields, builder data) write them here.\WP_Post $post
string $code
Free
tranzly_translation_memoryFilterFilters the translation memory in use: none in the free plugin; the premium layer offers one (docs/843, WordPress.org guideline 5).Translation_Memory|null $memoryFree