Implement fallbackLocale per field #164
Replies: 3 comments
-
Hi @Ontopic, if I understand your use case correctly, then you would want to set Is the problem that your fallback locale has one value but the other locales need to default to something different? In that case I think you'll need to set all the locales to have the URL instead of relying on the fallback for this particular field. Another thought, depending on your implementation you could put the logic in the frontend by querying with Let me know what you think. We're happy to help figure out best practices and improve Payload where we can. |
Beta Was this translation helpful? Give feedback.
-
I was thinking in similar directions. Mostly verifying this is not something already on your timeline before I start a redundant pull-request. I'll post my findings here to work out the best way to go. Thanks for your input! |
Beta Was this translation helpful? Give feedback.
-
One thing to note that I think may be a bug though is that even when fallbackLocale is set to false in |
Beta Was this translation helpful? Give feedback.
-
Currently I'm entertaining several options to allow for specifying a field on a "global" level (so for every locale, not an application global), but allow a locale to overwrite the "global" value.
Use-case e.g. would be a site that hosts several languages, all the texts are translated, but there's an external link that usually is the same for every locale, but sometimes will need to be adjusted. I want the external links to use fallbackLocale, but not the text field.
So far I don't think there's a way to specify fallback policy on a field level? More influence on this would be very welcome for multilingual sites. If there's a rough plan you guys have in mind, I'm more than happy to implement it. Otherwise let's discuss how we could approach this.
Beta Was this translation helpful? Give feedback.
All reactions