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.

Locale inside PayloadRequest is always in default locale for collections w/ localization

default discord avatar
yhn5790last year
2

I'm trying to implement

locale

based RBAC. Basically, I want certain fields to be edited only on one locale for example config related fields however the

req.locale

is always

en (default locale)

. How do I get the current locale? 🤔

  • discord user avatar
    jesschow
    last year

    Hi @John, this issue was recently fixed. If you have already migrated to 2.0, you can upgrade to v2.2.0 to fix this! Let us know if you have any further questions or issues.

  • default discord avatar
    yhn5790last year

    :payloadlove:

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.