thompsonsj

payload crowdin sync

by thompsonsj
Translation
v3
3.93.0

Overview

Summary generated from the README

Sends localized fields from collections and globals to a Crowdin project when a document is saved as a draft or published. Nested fields, including Lexical blocks, are flattened into one fields.json plus HTML files for rich text, and translations are restored into the original structure. It is configured through a plugin entry with a Crowdin project ID, token, source locale and locale map.

Features

  • Uploads only changed localized fields to Crowdin on save
  • Converts Slate and Lexical rich text to HTML and back, including blocks, uploads and tables
  • Collects nested fields from groups, arrays, blocks and tabs into a single fields.json
  • Excludes chosen fields or collections, with conditional enabling based on document data
  • Loads translations for one or all locales via an admin checkbox, REST review or a Payload job
  • Skips translations missing required fields and recreates files or folders deleted in Crowdin

Use cases

  • Translate multilingual Payload content through Crowdin translators and keep it in sync
  • Keep Crowdin file counts low for documents with deeply nested Lexical blocks
  • Review incoming translations over REST before applying them as drafts or published content

From the author

Upload and sync localized fields from the default locale to Crowdin.

Installation

npm i @payload-crowdin-sync-nx/source

14

Stars

8

Forks

4

Open Issues

3 weeks ago

Last Updated

0

Weekly Downloads

v

npm Version

Dependencies

GitHub stars

140 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 202614
Dec 4, 202614
Dec 3, 202614
Dec 2, 202614
Dec 1, 202614
Nov 30, 202614
Nov 29, 202614
Nov 28, 202614
Nov 27, 202614
Nov 26, 202614
Nov 25, 202614
Nov 24, 202614
Nov 23, 202614
Nov 22, 202614
Nov 21, 202614
Nov 20, 202614
Nov 19, 202614
Nov 18, 202614
Nov 17, 202614
Nov 16, 202614
Nov 15, 202614
Nov 14, 202614
Nov 13, 202614
Nov 12, 202614
Nov 11, 202614
Nov 10, 202614
Nov 9, 202614
Nov 8, 202614
Nov 7, 202614
Nov 6, 202614
Nov 5, 202614
Nov 4, 202614
Nov 3, 202614
Nov 2, 202614
Nov 1, 202614
Oct 31, 202614
Oct 30, 202614
Oct 29, 202614
Oct 28, 202614
Oct 27, 202614
Oct 26, 202614
Oct 25, 202614
Oct 24, 202614
Oct 23, 202614
Oct 22, 202614
Oct 21, 202614
Oct 20, 202614
Oct 19, 202614
Oct 18, 202614
Oct 17, 202614
Oct 16, 202614
Oct 15, 202614
Oct 14, 202614
Oct 13, 202614
Oct 12, 202614
Oct 11, 202614
Oct 10, 202614
Oct 9, 202614
Oct 8, 202614
Oct 7, 202614
Oct 6, 202614
Oct 5, 202614
Oct 4, 202614
Oct 3, 202614
Oct 2, 202614
Oct 1, 202614
Sep 30, 202614
Sep 29, 202614
Sep 28, 202614
Sep 27, 202614
Sep 26, 202614
Sep 25, 202614
Sep 24, 202614
Sep 23, 202614
Sep 22, 202614
Sep 21, 202614
Sep 20, 202614
Sep 19, 202614
Sep 18, 202614
Sep 17, 202614
Sep 16, 202614
Sep 15, 202614
Sep 14, 202614
Sep 13, 202614
Sep 12, 202614
Sep 11, 202614
Sep 10, 202614
Sep 9, 202614
Sep 8, 202614
Sep 7, 202614
Sep 6, 202614
npm weekly downloads

Trends appear after 7 days of data. Daily snapshots have not started yet.

Each point is npm's rolling 7-day download count.

Health Score

26/100Fair

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/632087919-root.svg)](https://payloaddirectory.dev/plugins/632087919-root)
HTML
<a href="https://payloaddirectory.dev/plugins/632087919-root"><img src="https://payloaddirectory.dev/badge/632087919-root.svg" alt="Payload Directory"></a>
Updated Nov 14, 2026Created Apr 24, 2023

README

Payload Crowdin Sync

Reorganise nested Payload CMS documents into compact HTML and JSON files for Crowdin translators.

Documentation: thompsonsj.github.io/payload-crowdin-sync

Nested Payload documents, including blocks embedded in Lexical rich text, become HTML and JSON in Crowdin. File count stays low: one fields.json, one HTML file per rich text field, and a small folder per Lexical block. Numbers, selects, dates, uploads, relationships, and fields you exclude stay in Payload. Translations are written back into the same nested structure.

Features

  • Uploads on save. Localized fields in collections and globals are sent to Crowdin when you save a draft or publish. Only fields that changed are uploaded again.
  • Rich text as HTML. Slate and Lexical fields become HTML files that translators can edit in Crowdin's editor. Lexical blocks, uploads, relationships and tables are all converted back into Lexical when translations come in.
  • Nested fields. Localized fields inside groups, arrays, blocks, tabs, collapsibles and rows are collected into a single fields.json per document.
  • Only translatable fields. Numbers, selects, dates, uploads and relationships stay in Payload. You can exclude individual text fields (slugs, for example) so translators never see them.
  • Tidy Crowdin projects. Each collection gets a folder, and each document gets a subfolder. File count is kept down: one fields.json plus HTML for rich text. Blocks inside a Lexical field get their own nested folders.
  • Translations back in one click. Tick a checkbox in the admin panel to load translations for one locale or all of them, as a draft or published. You can also review changes first over REST, or run the sync as a Payload job.
  • Safe updates. A translation that is missing a required field isn't applied, and validation errors are reported.
  • Self-healing. If files or folders are deleted in Crowdin, the plugin removes its stale records and creates them again on the next save.
  • Fine-grained control. Enable collections conditionally based on document data, and exclude individual fields from Crowdin.

Quick start

npm install payload-crowdin-sync
import { buildConfig } from 'payload';
import { crowdinSync } from 'payload-crowdin-sync';

export default buildConfig({
  plugins: [
    crowdinSync({
      projectId: 323731,
      token: process.env.CROWDIN_TOKEN,
      sourceLocale: 'en',
      localeMap: {
        de_DE: { crowdinId: 'de' },
        fr_FR: { crowdinId: 'fr' },
      },
    }),
  ],
  // The rest of your config goes here
});

Save a document with localized fields, and its content appears in your Crowdin project:

Payload documents organised into folders and files in a Crowdin project

When translations are ready, tick Sync all translations on the document and save:

The Sync all translations checkbox in the Payload admin panel

Next: read the documentation for all options, supported fields and API endpoints.

npm · Changelog

Repository

This monorepo contains:

  • plugin/: the payload-crowdin-sync package published to npm
  • dev/: Payload install used for integration tests
  • docs-site/: the documentation site
npm install
npm run test
npm run docs:serve

See development and repository notes for testing, coverage, import maps and releases.

Similar plugins