Skip to content
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

The endpoint responds with the language defined by the accept-language headers instead of the one defined in the URL #222

Closed
dtrucs opened this issue Nov 30, 2023 · 1 comment · Fixed by #224
Labels
🐛 Bug Something isn't working

Comments

@dtrucs
Copy link

dtrucs commented Nov 30, 2023

If we call the same endpoint but with a different language in the URL
https://georiviereadmin.parc-haut-jura.fr/api/portal/fr/1/streams/1807/ or
https://georiviereadmin.parc-haut-jura.fr/api/portal/en/1/streams/1807/
I get the same result with JSON.

It returns the response with the accept-language headers defined by the sender (the browser, NodeJS, etc.). For testing purposes, you can change your browser's default language and refresh one of the above URLs to see the translations.

The API should not be interested in the sender's language, but in the language explicitly defined in the endpoint URL.

@submarcos
Copy link
Member

submarcos commented Dec 11, 2023

There is no traslation mecanism. So, even If I implement it, there is no "en" language defined, so all language used respond with default language defined

@submarcos submarcos linked a pull request Dec 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants