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.
Endpoints
| Ability | REST |
|---|---|
| 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
| Ability | Edition | REST | Permission | Parameters |
|---|---|---|---|---|
tranzly/bulk-translateStarts 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. | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/bulk-translate/run | edit_posts; publish_posts to publish | languages array (required)post_types arrayscope string: missing, stale, allengine stringpublish boolean |
tranzly/cancel-jobStops a job; translations already made are kept. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/cancel-job/run | manage_options (the REST route’s own check) | id string (required) |
tranzly/check-qualityHas 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. | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/check-quality/run | edit_post on that translation | id integer (required) |
tranzly/connect-supportConnects this site to Zinn Digital® support (name, email, consent). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/connect-support/run | manage_options (the REST route’s own check) | email string (required)name stringconsent boolean (required) |
tranzly/correct-segmentsSaves corrected segments of a translation (segments: key to text); corrected text is protected from re-translation. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/correct-segments/run | edit_post (the REST route’s own check) | id string (required)segments objecttexts object |
tranzly/create-jobStarts a background job translating listed posts (posts) or a whole post type into languages (langs). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/create-job/run | edit_posts (the REST route’s own check) | posts arraypost_type stringlangs array (required)engine stringstatus string: publish, draftforce boolean |
tranzly/create-post-translationCreates a draft translation of a post in a language (lang) to write by hand, without an engine. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/create-post-translation/run | the REST route’s own per-item permission check | id string (required)lang string (required)name stringslug stringdescription string |
tranzly/create-term-translationCreates a term’s translation in a language with a name, slug and description you give. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/create-term-translation/run | the REST route’s own per-item permission check | id string (required)lang string (required)name stringslug stringdescription string |
tranzly/disconnect-supportDisconnects this site from support. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/disconnect-support/run | manage_options (the REST route’s own check) | none |
tranzly/estimateEstimates characters and cost to translate posts (posts or post_type) into languages (langs) with an engine, before spending anything. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/estimate/run | edit_posts (the REST route’s own check) | posts arraypost_type stringlangs array (required)engine string |
tranzly/estimate-bulkEstimates a whole-site translation in a language (post_types, scope, engine) before starting it. | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/estimate-bulk/run | edit_posts (the REST route’s own check) | post_types arrayscope string: missing, stale, allengine stringlang string (required)after integer |
tranzly/export-translation-fileReturns 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. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/export-translation-file/run | edit_posts; each post is included only if the user may edit it | lang string (required)format string: xliff, csvposts arraypost_type stringstate string: all, missing, stale, translatedafter integer |
tranzly/fix-statusQueues translation of every missing (or out-of-date) item in a language and post type. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/fix-status/run | edit_posts (the REST route’s own check) | post_type stringlang string (required)state string (required): missing, stale, quality |
tranzly/get-comments-settingReturns whether comments are shared across languages or kept per language. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-comments-setting/run | moderate_comments (the REST route’s own check) | none |
tranzly/get-deepl-usageReturns the characters used and the limit of the saved DeepL key this month. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-deepl-usage/run | manage_options (the REST route’s own check) | none |
tranzly/get-diagnosticsReturns the diagnostics a support ticket would carry: versions, active plugins, limits and recent errors. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-diagnostics/run | manage_options (the REST route’s own check) | none |
tranzly/get-displayReturns the language switcher and credit display options. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-display/run | manage_options (the REST route’s own check) | none |
tranzly/get-engine-settingsReturns 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. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-engine-settings/run | manage_options (the REST route’s own check) | none |
tranzly/get-glossaryReturns the words never translated, the fixed term translations and the tone per language. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-glossary/run | manage_options | none |
tranzly/get-integrationsLists the SEO, WooCommerce, page-builder and form plugins Tranzly supports and which are active here. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-integrations/run | manage_options (the REST route’s own check) | none |
tranzly/get-jobReturns one job’s progress and counts. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-job/run | manage_options (the REST route’s own check) | id string (required) |
tranzly/get-job-failuresLists a job’s failed items with the reason for each. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-job-failures/run | manage_options (the REST route’s own check) | id string (required) |
tranzly/get-legacy-importReturns the state and report of importing translations from Tranzly 2.x. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-legacy-import/run | manage_options (the REST route’s own check) | none |
tranzly/get-licenceReturns this site’s Tranzly plan, licence state, renewal date and what the plan includes. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-licence/run | manage_options (the REST route’s own check) | none |
tranzly/get-menusReturns which menu each language shows in each menu location. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-menus/run | edit_theme_options (the REST route’s own check) | none |
tranzly/get-post-groupLists a post’s translation group: every language’s member with its title, status and edit link. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-post-group/run | edit_post and edit_term (the REST route’s own check) | id string (required) |
tranzly/get-quality-reportReturns a translation’s AI quality report: score and the segments it flagged. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-quality-report/run | edit_post (the REST route’s own check) | id string (required) |
tranzly/get-segmentsReturns a translation’s segments beside the original’s, for review and correction. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-segments/run | edit_post (the REST route’s own check) | id string (required) |
tranzly/get-shared-stringsReturns the theme and plugin texts (scope) in a language with their translations. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-shared-strings/run | edit_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-stringsReturns the site title, tagline and widget texts in a language. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-site-strings/run | manage_options (the REST route’s own check) | lang string (required) |
tranzly/get-support-connectionSays whether this site is connected to Zinn Digital® support, and as whom. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-support-connection/run | manage_options (the REST route’s own check) | refresh boolean |
tranzly/get-term-groupLists a category’s or tag’s translation group. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-term-group/run | edit_post and edit_term (the REST route’s own check) | id string (required) |
tranzly/get-urlsReturns how languages appear in addresses (folder, subdomain or domain), translated slugs and bases, and noindex for untranslated pages. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-urls/run | manage_options (the REST route’s own check) | none |
tranzly/get-workflow-settingsReturns auto-translation on publish and on update, review before publish, and the AI quality check’s threshold, provider and model. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/get-workflow-settings/run | manage_options (the REST route’s own check) | none |
tranzly/import-from-sourceImports the next page of translations from another multilingual plugin (mode: dry-run or run; cursor). | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/import-from-source/run | manage_options (the REST route’s own check) | source string (required)mode string: dry-run, run, undocursor string |
tranzly/import-translation-fileWrites the next page of posts from an uploaded translation file (repeat with after until done). | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/import-translation-file/run | edit_posts (the REST route’s own check) | token string (required)after integer |
tranzly/link-postMakes an existing post (target) the translation of this post in a language. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/link-post/run | edit_post and edit_term (the REST route’s own check) | id string (required)lang string (required)target integer (required) |
tranzly/link-termMakes an existing term (target) the translation of this term in a language. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/link-term/run | edit_post and edit_term (the REST route’s own check) | id string (required)lang string (required)target integer (required) |
tranzly/list-enginesLists the translation engines, whether each is set up, and which one is used when none is named. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/list-engines/run | edit_posts | none |
tranzly/list-import-sourcesLists WPML, Polylang and TranslatePress data found on this site that can be imported. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/list-import-sources/run | manage_options (the REST route’s own check) | none |
tranzly/list-jobsLists background translation jobs, newest first, with progress. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/list-jobs/run | edit_posts (the REST route’s own check) | none |
tranzly/list-languagesLists the site’s languages. The first one is the language the original content is written in. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/list-languages/run | edit_posts | none |
tranzly/list-status-itemsLists originals with their translation state in a language (state: missing, stale, current), page by page. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/list-status-items/run | edit_posts (the REST route’s own check) | post_type stringlang string (required)state string: all, missing, stale, translated, human, machine, review, qualityafter integer |
tranzly/list-theme-stringsLists the themes and plugins whose texts can be scanned for translation, and how many strings each has. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/list-theme-strings/run | manage_options (the REST route’s own check) | none |
tranzly/open-support-ticketFiles a support ticket (subject, message, kind, email), with this site’s diagnostics when the administrator agreed. It never creates a login or sends one. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/open-support-ticket/run | manage_options (the REST route’s own check) | subject string (required)message string (required)kind string: help, bug, feedback, feature_requestemail stringname stringdiagnostics boolean |
tranzly/record-support-consentRecords the administrator’s consent to send diagnostics with support tickets. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/record-support-consent/run | manage_options (the REST route’s own check) | consent boolean (required) |
tranzly/retry-job-itemRetries a failed item (action: retry, optionally with another engine) or marks it for translating by hand (action: by-hand). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/retry-job-item/run | edit_post and manage_options (the REST route’s own check) | item string (required)action string (required)engine string |
tranzly/review-translationApproves a translation (and publishes it when the original is published) or sends it back (decision, note). | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/review-translation/run | edit_post (the REST route’s own check) | id string (required)decision string (required): approve, changes, pendingnote string |
tranzly/run-legacy-importRuns the 2.x import: dry-run (report only), run, or undo. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/run-legacy-import/run | manage_options (the REST route’s own check) | action string (required) |
tranzly/scan-theme-stringsScans the next page of a component’s PHP files for translatable texts (repeat with after until done). | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/scan-theme-strings/run | manage_options (the REST route’s own check) | component string (required)after integer |
tranzly/schedule-quality-checkSchedules the AI quality check of the next page of a language’s translations (or the given posts). | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/schedule-quality-check/run | edit_posts (the REST route’s own check) | lang string (required)post_type stringposts arrayafter integer |
tranzly/seo-auditChecks translations for missing SEO titles, descriptions, slugs and hreflang in a language, page by page. | Pro | GET /wp-json/wp-abilities/v1/abilities/tranzly/seo-audit/run | manage_options (the REST route’s own check) | lang string (required)after integer |
tranzly/set-comments-settingShares comments across a post’s translations or keeps them per language (mode). | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-comments-setting/run | manage_options and moderate_comments (the REST route’s own check) | mode string (required): off, show, translate |
tranzly/set-engine-keySaves the API key (and region for Microsoft) of DeepL, Google or Microsoft; empty removes it. Keys are stored encrypted and never returned. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-engine-key/run | manage_options (the REST route’s own check) | engine string (required)key string (required)region string |
tranzly/set-menusAssigns a menu per language per location (map). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-menus/run | edit_theme_options (the REST route’s own check) | map object (required) |
tranzly/set-protectionProtects a translation from being overwritten by the engine (protected: true), or unlocks it. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-protection/run | edit_post (the REST route’s own check) | id string (required)protected boolean (required) |
tranzly/set-shared-stringsSaves corrected translations of theme and plugin texts (strings); they become protected. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-shared-strings/run | edit_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-stringSaves one site text (key) in a language, e.g. the site title or tagline. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-site-string/run | edit_theme_options and manage_options (the REST route’s own check) | lang string (required)key string (required)translation string (required) |
tranzly/set-urlsSets the address mode (mode), per-language domains, translated bases and segments, noindex_untranslated and slug suggestions. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/set-urls/run | manage_options (the REST route’s own check) | mode stringsegments objectdomains objectbases objectsuggest booleannoindex_untranslated boolean |
tranzly/start-trialStarts the 14-day Tranzly Pro trial for this site (no payment needed). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/start-trial/run | manage_options (the REST route’s own check) | none |
tranzly/translate-media-fieldSaves an image’s alt text, title or caption (field) in a language (lang). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/translate-media-field/run | edit_post (the REST route’s own check) | id string (required)lang string (required)field string (required): alt, caption, titletranslation string (required) |
tranzly/translate-postTranslates 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. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/translate-post/run | may translate that post (edit_post on it); edit_post on an existing translation; the type’s publish capability to publish | id integer (required)languages array (required)engine stringpublish booleanforce boolean |
tranzly/translate-shared-stringsTranslates the next page of untranslated theme and plugin texts in a language with the default engine (repeat with after until done). | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/translate-shared-strings/run | edit_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-siteA guided workflow: the agent checks the languages and engine, estimates the cost, and translates what is missing, asking before it spends or publishes. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/translate-site/run | edit_posts | languages string (required) |
tranzly/translate-termTranslates one term (category, tag or product attribute) into a language (lang) with an engine, creating or updating its translation. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/translate-term/run | the REST route’s own per-item permission check | id string (required)lang string (required)engine stringforce booleanstatus string: publish, draft |
tranzly/translation-statusWith 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. | Free | GET /wp-json/wp-abilities/v1/abilities/tranzly/translation-status/run | edit_post on that post; edit_posts for the site summary | id integerpost_type string |
tranzly/unlink-postTakes a post out of its translation group; it keeps its language. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/unlink-post/run | edit_post and edit_term (the REST route’s own check) | id string (required) |
tranzly/unlink-termTakes a term out of its translation group. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/unlink-term/run | edit_post and edit_term (the REST route’s own check) | id string (required) |
tranzly/update-displayChanges the switcher (style, flags, names, placement) and the credit line. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/update-display/run | manage_options (the REST route’s own check) | switcher objectcredit boolean |
tranzly/update-engine-settingsSets 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. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/update-engine-settings/run | manage_options (the REST route’s own check) | default stringper_lang objectfallback arraycaps objectmodels object |
tranzly/update-glossaryReplaces 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. | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/update-glossary/run | manage_options | dnt arrayterms objecttone object |
tranzly/update-settingsSets 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. | Free | POST /wp-json/wp-abilities/v1/abilities/tranzly/update-settings/run | manage_options (the REST route’s own check) | prefix stringmcp booleanlanguages array |
tranzly/update-workflow-settingsSets on_update (off, stale, translate), on_publish, review, quality_threshold, quality_provider and quality_model. | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/update-workflow-settings/run | manage_options (the REST route’s own check) | on_update string: off, stale, translateon_publish booleanreview booleanquality_threshold integerquality_provider stringquality_model string |
tranzly/upload-translation-fileUploads a Tranzly XLIFF or CSV file (content, filename) translated elsewhere; answers a token that identifies the upload for the import. | Pro | POST /wp-json/wp-abilities/v1/abilities/tranzly/upload-translation-file/run | edit_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.
| Command | What it does | Edition |
|---|---|---|
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 engines | List 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=adminwp tranzly jobs status 12wp tranzly jobs failures 12wp tranzly jobs retry 345 --engine=deeplwp tranzly jobs retry-failed 12wp 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-runwp tranzly legacy runwp 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 setupwp 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=adminwp 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.
| Function | What it does | Edition |
|---|---|---|
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(): string | The language of the current request (a WordPress locale code such as `fr_FR`). | Free |
tranzly_default_language(): string | The default language: the first listed. | Free |
tranzly_get_engines(): array | The engines available: id => name. | Free |
tranzly_get_post_language( int $post_id ): string | The language a post is written in. | Free |
tranzly_get_term_language( int $term_id ): string | The language a term is written in. | Free |
tranzly_get_term_translation( int $term_id, string $lang ): ?int | A term’s translation into a language, or null. | Free |
tranzly_get_term_translations( int $term_id ): array | Every version of a term: language code => term ID. | Free |
tranzly_get_translation( int $post_id, string $lang ): ?int | The 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 ): array | Every 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 ): string | A URL showing the given language. | Free |
tranzly_languages(): array | The 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(): bool | Undo the last tranzly_switch_language(). | Free |
tranzly_switch_language( string $lang ): bool | Make 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 ): array | The 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.
| Hook | Kind | What it does | Parameters | Edition |
|---|---|---|---|---|
tranzly_admin_bar | Action | Fires after the Translations admin-bar menu is built (the Pro visual editor adds its “Translate on this page” item here). | \WP_Admin_Bar $barint $id | Free |
tranzly_admin_data | Filter | Filters 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. | none | Free |
tranzly_ai_model | Filter | Filters 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 $target | Free |
tranzly_ai_providers_in_use | Filter | Filters 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. | none | Free |
tranzly_content_before_rebuild | Filter | Filters the source content just before translated segments are written into it, per language (the Pro per-language image swap uses it). | string $contentstring $lang | Free |
tranzly_copy_meta_keys | Filter | Filters the meta keys copied from a post onto its new translation. Nothing else is copied. | int $source_id | Free |
tranzly_deepl_host | Filter | Filters the DeepL API host (a proxy, or a test double). | string $hoststring $key | Free |
tranzly_deepl_price_per_million | Filter | Filters DeepL’s price per million characters in US dollars. | float $price | Free |
tranzly_default_engine | Filter | Filters the id of the engine used when none is named. | string $id | Free |
tranzly_engine_cap | Filter | Filters an engine’s monthly cap in US dollars: none in the free plugin. | float|null $capstring $engine | Free |
tranzly_engine_chain | Filter | Filters 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 $langstring $first | Free |
tranzly_engine_options | Filter | Filters the options passed to the engine (do-not-translate list, glossary, formality, instructions). | string $targetEngine $engine | Free |
tranzly_engine_settings_save | Filter | Saves 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). | none | Free |
tranzly_frontend_prefix | Filter | Filters the neutral front-end class prefix. | string $prefix | Free |
tranzly_fs_loaded | Action | Fires once the licensing SDK has loaded (in the main file, before any Tranzly code). Hook here to talk to `tranzly_fs()`. | none | Free |
tranzly_glossary_options | Filter | Filters the engine options for a target language: the do-not-translate list, plus the glossary and tone when the premium layer adds them. | string $lang | Free |
tranzly_glossary_save | Filter | Saves preferred translations and tone per language. Only the premium layer answers (WordPress.org guideline 5: no Pro behaviour in the free plugin). | none | Free |
tranzly_google_price_per_million | Filter | Filters Google Cloud Translation’s price per million characters, US dollars. | float $price | Pro |
tranzly_install_language_packs | Filter | Whether 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 $install | Free |
tranzly_integration_available | Filter | Filters 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 $onstring $id | Free |
tranzly_integrations | Filter | Filters the integrations Tranzly runs. Add an `Integration` subclass to support another plugin. | none | Free |
tranzly_is_pro | Filter | Filters whether the premium layer is running. Only the premium layer answers it. | bool $pro | Free |
tranzly_job_created | Action | Fires after a translation job is created. | int $jobint $items | Free |
tranzly_job_finished | Action | Fires when a translation job has no work left. | int $job_id | Free |
tranzly_kit_api_base | Filter | Filters the Zinn Digital® API base the support screens call. | string $base | Free |
tranzly_kit_diagnostics | Filter | Filters 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. | none | Free |
tranzly_kit_footprint_free | Filter | Filters whether this site is footprint-free, so Zinn® Ads is never promoted on it. | bool $footprint_free | Free |
tranzly_kit_promotions | Filter | Filters 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`. | none | Free |
tranzly_kit_tier | Filter | Filters the plan tier the kit reports for this plugin (tests and staging; the licence decides in production). | string $tier | Free |
tranzly_localize_links | Filter | Filters whether Tranzly points this page’s internal links at their translations. | bool $localizestring $lang | Free |
tranzly_memory_enabled | Filter | Filters whether translation memory is used. | bool $on | Pro |
tranzly_microsoft_price_per_million | Filter | Filters Microsoft Translator’s price per million characters, US dollars. | float $price | Pro |
tranzly_network_enabled | Filter | Filters whether the multisite network layer is on. | bool $agency | Free |
tranzly_pbs_internal_post_types | Filter | Filters the Page Builder Sandwich post types Tranzly leaves alone. | none | Free |
tranzly_post_segments | Filter | Filters 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 $post | Free |
tranzly_post_translated | Action | Fires after an engine translated a post (or a person’s file or an import wrote one). | int $targetint $source_idstring $codestring $engine | Free |
tranzly_post_translation_created | Action | Fires after Tranzly creates a post translation. | int $new_idint $source_idstring $code | Free |
tranzly_post_types | Filter | Filters the post types Tranzly translates. | none | Free |
tranzly_pre_current_language | Filter | Short-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 $lang | Free |
tranzly_query_var | Filter | Filters the query variable that selects the language. | string $var | Free |
tranzly_queue_lease_seconds | Filter | Filters 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 $seconds | Free |
tranzly_queue_worker_seconds | Filter | Filters how long one worker runs before handing over, in seconds. | int $seconds | Free |
tranzly_queue_workers | Filter | Filters 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 $workersint $job_id | Free |
tranzly_rate_source_ | Filter | Rates from another source (see `tranzly_rate_sources`). | none | Pro |
tranzly_rate_sources | Filter | Filters the exchange-rate sources. Add one with a `tranzly_rate_source_<id>` filter that returns `[ code => rate against its reference ]`, or a WP_Error. | none | Pro |
tranzly_register_engines | Action | Register translation engines. Call `$registry->add( new Your_Engine() )`. | Registry $registry | Free |
tranzly_relations_changed | Action | Fires 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 $typearray<int> $ids | Free |
tranzly_robots_meta_keys | Filter | Filters the post meta keys that hold robots settings; each follows the original onto its translations. | none | Free |
tranzly_shared_string_scopes | Filter | Filters the shared-text scopes (lane L06, T6: integrations add `woocommerce`, `forms` and `theme`; their texts come in on `tranzly_shared_strings`). | none | Free |
tranzly_shared_strings | Filter | Filters the shared texts Tranzly translates as strings, per scope. The Pro layer adds block templates, template parts and patterns to `templates`. | string $scope | Free |
tranzly_shared_strings_covered | Filter | Filters 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 $scopestring $lang | Free |
tranzly_source_changed | Action | Fires when an original’s translatable content changed, so its translations are now out of date. | int $post_idstring $nowstring $before | Free |
tranzly_source_meta_keys | Filter | Filters 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_id | Free |
tranzly_source_published | Action | Fires once when an original is first published (after its meta is saved). | int $post_id | Free |
tranzly_style_rules_enabled | Filter | Whether 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 $enabledstring $locale | Free |
tranzly_taxonomies | Filter | Filters the taxonomies Tranzly translates. | none | Free |
tranzly_term_segments | Filter | Filters 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 $term | Free |
tranzly_term_translated | Action | Fires after an engine translated a term, with every translated segment (integrations write the segments they added on `tranzly_term_segments`). | int $targetint $term_idstring $code | Free |
tranzly_term_translation_created | Action | Fires after Tranzly creates a term translation. | int $new_idint $term_idstring $code | Free |
tranzly_translatable_attributes | Filter | Filters the attributes Tranzly translates for a block type. | string $block_name | Free |
tranzly_translate_string | Filter | Filters one translatable string into a language. | string $valuestring $codearray $context | Free |
tranzly_translated_post_fields | Filter | Filters 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 $poststring $code | Free |
tranzly_translation_memory | Filter | Filters the translation memory in use: none in the free plugin; the premium layer offers one (docs/843, WordPress.org guideline 5). | Translation_Memory|null $memory | Free |