Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
payloadcms avatar

Generate Translations

  • 526 installs
  • 44k repo stars
  • Updated August 5, 2026
  • payloadcms/payload

generate-translations is a Payload CMS agent skill that creates and updates translation files across core packages and plugin packages for developers who ship multilingual admin and frontend experiences.

About

generate-translations is an official Payload CMS skill that automates i18n file maintenance when new translation keys appear in the monorepo. Payload maintains two parallel systems: Core Translations for packages/ui, packages/payload, and packages/next, and Plugin Translations for packages/plugin-* directories, each with distinct scaffolding steps documented in the skill guide. The skill allows Write and Bash tools for mkdir and date commands so agents can scaffold plugin locales and regenerate strings after key additions. Developers reach for it during PRs that introduce user-facing labels, error messages, or admin UI copy that must propagate to every supported locale. It reduces manual copy-paste across translation JSON files and documents scaffolding for brand-new plugin translation trees. It is not a runtime translation service; it is a maintainer workflow for Payload contributors and teams extending Payload plugins with localized strings.

  • Generates complete translation JSON files from your Payload CMS schema and existing content
  • Supports multiple languages with consistent key structures across locales
  • Maintains translation files as your models and fields evolve
  • Reduces manual i18n work from hours to minutes per language
  • Integrates directly into Payload CMS admin and build workflows

Generate Translations by the numbers

  • 526 all-time installs (skills.sh)
  • +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #1,719 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/payloadcms/payload --skill generate-translations

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs526
repo stars44k
Last updatedAugust 5, 2026
Repositorypayloadcms/payload

How do you generate Payload CMS translation files for new keys?

Automatically generate and maintain translation files for multilingual Payload CMS applications.

Who is it for?

Payload CMS contributors and plugin authors adding or changing UI strings who need automated translation file generation across core and plugin packages.

Skip if: Teams not using Payload CMS or projects that only need runtime machine translation without maintaining Payload locale files.

When should I use this skill?

New translation keys are added to packages/ui, packages/payload, packages/next, or packages/plugin-* in a Payload monorepo.

What you get

Updated core and plugin translation JSON files, scaffolded plugin locale directories, and consistent i18n strings across Payload packages.

  • Updated translation JSON files
  • Scaffolded plugin locale directories

Files

SKILL.mdMarkdownGitHub ↗

Translation Generation Guide

Payload has two separate translation systems:

1. Core Translations - for core Payload packages (packages/ui, packages/payload, packages/next) 2. 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:

1. 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',
       },
     }

2. Add client key (if needed for client-side usage) to packages/translations/src/clientKeys.ts

  • Add the translation key path using colon notation
  • Example: 'authentication:newFeature'
  • Client keys are used for translations that need to be available in the browser

3. Generate translations for all languages

  • Change directory: cd tools/scripts
  • Run: pnpm generateTranslations:core
  • This auto-translates your new English keys to all other supported languages

---

2. Plugin Translations

When to use: Adding translations to any plugin package (packages/plugin-\*)

Steps:

1. Verify plugin has translations folder

  • Check if packages/plugin-{name}/src/translations exists
  • If it doesn't exist, see "Scaffolding New Plugin Translations" below

2. Add the English translation to the plugin's packages/plugin-{name}/src/translations/languages/en.ts

  • Plugin translations are namespaced under the plugin name
  • Example for plugin-multi-tenant:
     export const enTranslations = {
       'plugin-multi-tenant': {
         'new-feature-label': 'New Feature',
       },
     }

3. Generate translations for all languages

  • Change directory: cd tools/scripts
  • Run the plugin-specific script: pnpm generateTranslations:plugin-{name}
  • Examples:
  • pnpm generateTranslations:plugin-multi-tenant
  • pnpm generateTranslations:plugin-ecommerce
  • pnpm generateTranslations:plugin-import-export

Scaffolding New Plugin Translations

If a plugin doesn't have a translations folder yet, ask the user if they want to scaffold one.

Structure to create:
packages/plugin-{name}/src/translations/
├── index.ts
├── types.ts
└── languages/
    ├── en.ts
    ├── es.ts
    └── ... (all other language files)
Files to create:

1. types.ts - Define the plugin's translation types 2. index.ts - Export all translations and re-export types 3. languages/en.ts - English translations (the source for generation) 4. *languages/\.ts** - Other language files (initially empty, will be generated)

Generation script to create:

1. Create tools/scripts/src/generateTranslations/plugin-{name}.ts

  • Use plugin-multi-tenant.ts as a template
  • Update the import paths to point to the new plugin
  • Update the targetFolder path

2. Add script to tools/scripts/package.json:

   "generateTranslations:plugin-{name}": "node --no-deprecation --import @swc-node/register/esm-register src/generateTranslations/plugin-{name}.ts"

---

Important Notes

  • All translation generation requires OPENAI_KEY environment variable to be set
  • The generation scripts use OpenAI to translate from English to other languages
  • Always add translations to English first - it's the source of truth
  • Core translations: Client keys are only needed for translations used in the browser/admin UI
  • Plugin translations: Automatically namespaced under the plugin name to avoid conflicts

Related skills

How it compares

Use generate-translations for Payload monorepo locale maintenance instead of generic i18n extractors that do not understand Payload's core versus plugin translation split.

FAQ

What translation systems does Payload CMS use?

Payload CMS separates Core Translations for packages/ui, packages/payload, and packages/next from Plugin Translations under packages/plugin-*. The generate-translations skill documents workflows for both paths when new keys are introduced.

When should I run generate-translations in Payload?

Run generate-translations when a PR adds user-facing strings to Payload core or plugin packages. The skill scaffolds plugin locales and regenerates translation files so every supported language receives the new keys.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.