We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0131c0f commit a7f40a2Copy full SHA for a7f40a2
client/src/lib/http-client.ts
@@ -1,3 +1,4 @@
1
+import { ELang } from '@/types/share';
2
import axios from 'axios';
3
4
const http_client = axios.create({
@@ -10,6 +11,11 @@ const http_client = axios.create({
10
11
12
http_client.interceptors.request.use(
13
function (config) {
14
+ const lang = localStorage.getItem('lang') || ELang.EN;
15
+
16
+ config.headers['Accept-Language'] = lang;
17
+ config.headers['lang'] = lang;
18
19
return config;
20
},
21
function (error) {
0 commit comments