You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create multi-language site using contentful as the headless CMS. I have setup the contentful content model as follows:
The Navigation content type has a title and a links field, which references many Links.
The Link content type has a title field (localized) and a page field, which references one Page.
The Page content type has a title field (localized) and a text field (localized).
When rendering page, I want to render the main navigation depending on the locale of each page, so that the links in the main navigation point to localized pages - if available - instead of pages written in the default locale.
The response does not contain the localized nodes, only the nodes with the default locale (de-DE). I expect nodes for the secondary locale (en) to be included:
1. Create a contentful content type A, which itself has no localized fields and references another content type B, which has localized fields.
2. Try to retrieve the referenced entries of type B by querying an entry of type A. The response will only include the entries of type B in the default locale. Other locales are missing.
The text was updated successfully, but these errors were encountered:
Description
I am trying to create multi-language site using contentful as the headless CMS. I have setup the contentful content model as follows:
The
Navigation
content type has atitle
and alinks
field, which references manyLink
s.The
Link
content type has atitle
field (localized) and apage
field, which references onePage
.The
Page
content type has atitle
field (localized) and atext
field (localized).When rendering page, I want to render the main navigation depending on the locale of each page, so that the links in the main navigation point to localized pages - if available - instead of pages written in the default locale.
Environment
Gatsby version:
^1.9.158
Node.js version:
v9.4.0
Operating System: macOS 10.13.3
File contents (if changed)
The file contents shouldn't matter, I can add them later if requested.
GraphQL query
To retrieve the main navigation, I use the following query in the
page.js
template:Actual result
I tested this query in GraphiQL and this is what I received:
Expected behavior
The response does not contain the localized nodes, only the nodes with the default locale (
de-DE
). I expect nodes for the secondary locale (en
) to be included:Steps to reproduce
1. Create a contentful content type
A
, which itself has no localized fields and references another content typeB
, which has localized fields.2. Try to retrieve the referenced entries of type
B
by querying an entry of typeA
. The response will only include the entries of typeB
in the default locale. Other locales are missing.The text was updated successfully, but these errors were encountered: