Possible to turn off localization?
See original GitHub issueWhen I receive data in gatsby-source-contentful
the fields are normal…
{
title: "Example"
}
But when I use rich-text
, the fields are nested, like so…
{
fields {
title: {
"en-US": "Example"
}
}
}
I have localization turned off, so why am I receiving localized data?
Is there any way to prevent this in rich-text
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
Turn Location Services and GPS on or off on your iPhone ...
How to turn Location Services on or off for specific apps. Go to Settings > Privacy > Location Services. Make sure that Location...
Read more >How to Disable Location Services on iOS and Android
In your Location settings, tap on App permissions. · Select the app you'd like to exempt from having location access. · Make sure...
Read more >How to Turn Off Location Services and Stop Your iPhone Apps ...
To turn off location services completely, navigate to Settings > Privacy > Location Services and toggle off Location Services at the top of...
Read more >How to Limit Location Tracking on Your Phone
In short, go to Settings > Privacy > Location Services. At the top of the screen, there's a toggle switch to turn the...
Read more >How to turn off Google's location tracking - The Guardian
How to turn off Google's location tracking · Head to settings. · Tap on Google then Google Account · Tap on the data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now a feature in
gatsby-source-contentful
. You can pass in the following option and the locale nodes will no longer be present in rich text fields.Yeah, having the option to turn off location would be ideal. It also wraps props in a ‘fields’ object which isn’t great when rendering components dynamically and spreading the props.
I had to go through the fields recursively and remove them. I could improve this so that instead of cloning the object and then reassigning function parameters it builds the clean fields dynamically, but I’m yet to get round to it.
For anyone looking for a quick solution:
First I destructure the props:
const { fields } = node.data.target;
Then I clean the object by passing the fields to the following function: