Generate Translations
Step-by-step workflow that adds new translation keys to Payload core or plugin packages and auto-generates all languages.
- CCM score
- 78 of 100
- skills.sh installs
- 586
- GitHub stars
- 46K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers two separate systems: core translations for packages/ui, payload, and next, and plugin translations for packages/plugin-*
- Walks through English source edits in
en.ts, optional client key registration inclientKeys.ts, and generation viapnpm generateTranslations:*scripts - Requires an
OPENAI_KEYenvironment variable, since generation uses OpenAI to translate from English as the source of truth - Includes scaffolding steps for new plugin translation folders, with a prompt to ask the user before creating one
Install
$ npx -y skills add payloadcms/payload --skill generate-translations -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Translation Generation Guide
Payload has two separate translation systems:
- Core Translations - for core Payload packages (packages/ui, packages/payload, packages/next)
- Plugin Translations - for plugins (packages/plugin-*)
Table of Contents
1. Core Translations
When to use: Adding translations to core Payload packages (packages/ui, packages/payload, packages/next)
Steps:
-
Add the English translation to
packages/translations/src/languages/en.ts- Add your new key/value to the appropriate section (e.g.,
authentication,general,fields, etc.) - Use nested objects for organization
- Example:
export const enTranslations = { authentication: { // ... existing keys newFeature: 'New Feature Text', }, }
- Add your new key/value to the appropriate section (e.g.,
-
Add client key (if needed for client-side usage) to
packages/translations/src/clientKeys.ts
Details
- Repository
- github.com/payloadcms/payload
- First seen
- Jun 3, 2026
Questions
What does the generate-translations skill do?
The generate-translations skill is used when new translation keys are added to Payload packages, and it generates the new translation strings. It covers core Payload packages and plugin packages, which have separate translation systems.
How do I install the generate-translations skill?
Run npx -y skills add payloadcms/payload --skill generate-translations -y in a project to install it. Once installed, the agent can add English keys and generate matching translations for all supported languages.
What do I need before using generate-translations?
Translation generation requires the OPENAI_KEY environment variable to be set, because the scripts use OpenAI to translate from English. English keys must be added first, since English is the source of truth.
Who is generate-translations for?
It is for developers working in the Payload repository who add translation keys to core packages such as packages/ui, packages/payload and packages/next, or to plugin packages under packages/plugin-*. It can also scaffold translation folders for a new plugin.
More from payloadcms/payload
All 5Similar to Generate Translations
i18nSkilllobehub/lobehub4.8K installsInternationalization workflow for react-i18next keys, namespaces, and generated locale files in LobeHub.
TolgeeMCP servertolgee4.2K starsConnects to Tolgee translation projects: search keys, read and write translations, and run machine translation.
next-intl-add-languageSkillgithub/awesome-copilot9.4K installsStep-by-step guide for adding a new language to a Next.js app that uses next-intl.
i18n-localizationPluginalirezarezvani/claude-skills30.7K starsShip a new language without the usual breakage. Three deterministic stdlib scripts: a translation-file checker for JSON/ARB (i18next, ICU), .properties, .string
next-intl-app-routerSkillliuchiawei/agent-skills629 installsSetup and usage guide for next-intl with prefix-based locale routing in Next.js App Router projects.
book-translationSkillf/prompts.chat694 installsStep-by-step playbook for translating a 31-chapter prompting book and its interactive demo strings into a new locale.