Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
When using a label function on a document view tab that returns a translated string using the provided t function, the user's selected language is not applied. A field with the same label function translates the label appropriately into the correct language.
It seems to choose the language to translate the string into arbitrarily, and toggling the user's language preference has no effect on what the label translation resolves to.
For example, with Spanish selected:
With English selected, the tab text is still in Spanish.
Link to reproduction
No response
Environment Info
Describe the Bug
When using a label function on a document view tab that returns a translated string using the provided
t
function, the user's selected language is not applied. A field with the same label function translates the label appropriately into the correct language.It seems to choose the language to translate the string into arbitrarily, and toggling the user's language preference has no effect on what the label translation resolves to.
For example, with Spanish selected:
With English selected, the tab text is still in Spanish.
Reproduction Steps
Collection's Document View Config:
Example Field Config:
Adapters and Plugins
No response