Translator

Translates localized text, richText, and textarea fields with AI into other locales, saving the result as drafts where versions are enabled.

Community 1 419/wk MIT v0.1.1

Installation

pnpm add @runroom/payload-plugin-translator

About

This plugin fills in the other locales of your Payload collections and globals using an AI model. An editor opens a document in the admin, clicks the Translate control, and the plugin queues a job that translates the open locale into the remaining locales you configured. The plugin reads localized `text`, `textarea`, and Lexical `richText` fields, including those nested in arrays, groups, tabs, and blocks, as long as the container itself is not localized. The write path depends on whether the collection has drafts. For entities with `versions.drafts`, the translation is saved as a draft, so an editor reviews it and publishes with Payload's own Publish button. For entities without drafts, the translation is written directly and goes live immediately. The plugin does not overwrite text that someone edited by hand in a target locale. The plugin adds a `/api/translator/*` set of endpoints, two collections (`translation-records` and `translation-locks`) that track each target locale and keep one lock per document, and a `translateDocument` job task on a `translations` queue. Requires Payload 3.90.2 or later with `localization` enabled. The bundled OpenAI provider lives at a separate export path and needs the `openai` package. Set `runOnRequest: false` on serverless hosts and run the queue through `jobs.autoRun` or an external cron, because a job started after the response can be stopped when the function freezes.

Package info

Package name
@runroom/payload-plugin-translator
Latest version
0.1.1
Unpacked size
290 kB
License
MIT
Weekly downloads
419
Last publish
Oct 8, 2026

Similar plugins

More in AI