Commit 8dcf3c99 authored by Gijs Hendriksen's avatar Gijs Hendriksen
Browse files

Merge branch 'fix/fallback-language' into 'master'

Add default language for url requests

Closes #77

See merge request !203
parents fde1d0f3 55fbefce
......@@ -50,7 +50,12 @@ export const apiRequest = (route, fetchOpts, params) => {
if (!requestOptions.headers) {
requestOptions.headers = {};
}
requestOptions.headers['Accept-Language'] = locale;
if (locale.includes('en') || locale.includes('nl')) {
requestOptions.headers['Accept-Language'] = locale;
} else {
requestOptions.headers['Accept-Language'] = 'en';
}
let query = '';
if (params !== null && params === Object(params)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment