-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to request entities in a specific locale #98
Comments
Ok, digging into this a bit further, I can see there are 2 options:
Option 2 would mean that all locale data is always returned, which could be useful, but would mean all responses are "heavy" and the user has to implement fallback logic for missing values. The structs would need to change to match this, which I don't think would be backwards-compatible and would require a version bump. So I don't think this is a valid option. I've got a local working version of option 1, implementing a method named Contentful.Delivery.Entries |> Contentful.Query.using_locale("fr") |> Contentful.Query.fetch_all() I'm not sure how I feel about this solution. It works, but it does require remembering to set it whenever making a request. I suppose that isn't too onerous. Maybe it's just the name I don't like… Either way, I can't raise a PR for this until #97 is merged since I need both changes for the work I'm doing. I'll happily raise a PR for this code once #97 is merged. |
Right now there's no way to specify what locale should be used for the requested entities. Everything always comes back in the primary locale as defined in the Contentful interface.
The text was updated successfully, but these errors were encountered: