[gatsby-source-contentful] Fallback to default locale on non-localised fields
See original GitHub issueFor fields that are set not to be localised in Contentful and language fallback for foreign languages turned off in Contentful I think Gatsby should use the value of the field from the default language.
We for example have name
field for each content type inside Contentful that is set not to be localised. Currently Gatsby will just set the value of name
for other locales to null
. The same applies for many of the images we have in Contentful that we have set not to be localised and would like to use the same image for each locale, but currently this doesn’t seem to be possible.
Seems that #2539 changed the behaviour of the locale fallbacks, but this particular use case is not covered by it.
This might not be 100% in line with Contentful’s behaviour, so maybe this could be configurable option in gatsby-source-contentful
?
I’m happy to do a PR if you think this is legitimate suggestion.
Or is there some other way to fallback to the default locale for fields that are set not to be localised?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Hi @evuolas, are you still on this PR? I would hate to steal your thunder, but I think this is still an open issue and would love to bring this issue to a close.
Hi @evuolas , That’s a good starting point. I would say you add some tests and start a PR and I will give you some more testing scenarios for your solution, once we cover all of them we can merge it.