Typed REST client for Payload with the same query syntax as the Local API
Translator
Fills localized Payload content in other locales with Google, OpenAI or copy resolvers
Installation
pnpm add @payload-enchants/translator About
Translator adds a button to the admin panel that fills a localized document with text from another locale. You pick the source locale and the target, then choose whether to translate every field or only the empty ones. Rich text fields built with Lexical or Slate are handled, and nested fields are included.
The translation itself comes from a resolver. Google Translate and OpenAI are included, a copy resolver duplicates text without changing it, and you can write your own resolver for another service. Fields can be excluded from translation individually.
The same translation is also available through the Local API, so a hook can fill the other locales automatically when a post is created. Google and OpenAI resolvers need an API key from their provider.
Package info
- Package name
@payload-enchants/translator- Latest version
1.3.0- Unpacked size
- 158 kB
- License
- MIT
- Weekly downloads
- 3.8k
- Last publish
- Nov 24, 2024
More from r1tsuu
View profileLets API requests pick which fields come back, like GraphQL field selection
Caches local Payload reads for pages and clears them on content changes
Lets each collection compute its admin document title from a custom function
Adds SEO meta fields to collections with OpenAI-generated titles and descriptions
Shows each localized field's value in every locale tab in the admin panel
Similar plugins
More in i18nTranslates default-locale content into secondary locales with OpenAI or a custom provider
Translates localized content fields with an AI provider from the admin panel
Sends localized Payload fields to Crowdin and writes translations back
Generates and stores URL slugs per locale for localized Payload collections
Transcribes audio uploads, then translates and reads transcripts aloud
Restyles the Payload admin panel from one accent color, with a dashboard and command palette