Payload Crowdin Sync
Automatically upload/sync localized fields from the default locale to Crowdin. Make these fields read-only in other locales and update them using Crowdin translations.
- Plugin docs:
plugin/README.md - Payload test installation:
dev/ - Payload test installation (alternative config):
dev-alternative-config/ - NX generated docs:
repo/nx.md
Quick start
npm install payload-crowdin-sync
Add the plugin to your Payload configuration.
import { crowdinSync } from "payload-crowdin-sync";
export default buildConfig({
plugins: [
crowdinSync({
projectId: 323731,
token: process.env.CROWDIN_TOKEN,
organization: process.env.CROWDIN_ORGANIZATION,
localeMap: {
de_DE: {
crowdinId: "de",
},
fr_FR: {
crowdinId: "fr",
},
},
sourceLocale: "en",
}),
],
// The rest of your config goes here
});
On save draft or publish, content from localized fields in Collections and/or globals is organised into directories and files within a Payload CMS directory (configurable) in your Crowdin project.
To load translations into Payload CMS, check the Sync all translations checkbox on a given collection document/global and save draft (loads translations as draft) or publish.
Monorepo scripts
Test
Run all tests.
- The
pluginpackage contains unit tests. - Both the
devanddev-alternative-configpackages contain integration tests run against Payload installations.
npm run test
Release
Releases are managed by release-please. When a release PR is merged to main, the release-please workflow builds and publishes payload-crowdin-sync to npm via trusted publishing (OIDC).
One-time npm setup (package maintainer): on npmjs.com → Settings → Trusted publishing, add a GitHub Actions publisher for repository thompsonsj/payload-crowdin-sync and workflow filename release-please.yml. After verifying automated publishes work, revoke the NPM_TOKEN repository secret.
Manual publish remains available as a fallback:
npm run release