Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Local API: How to provide data for all locales?

default discord avatar
phewbar2 years ago
4

How can I provide data for all locales when using

payload.create

?

title

is normally a string.. Do I have to make two API calls (one create and one update)?


Or is something like this possible:


payload.create({
    collection: 'pages',
    data: {
        title: {en: ..., es: ...},
    }
});
  • discord user avatar
    dribbens
    2 years ago

    This isn't currenlty possible with the existing APIs.


    For now you have to create in one locale and then perform a separate update for each locale.


    At some point this will need to be built into Payload.

  • default discord avatar
    phewbar2 years ago

    thanks! 🙂

  • default discord avatar
    linobino1last year

    I want this too!

  • discord user avatar
    dribbens
    last year

    Noted!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.