mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-26 09:50:32 +01:00
working
This commit is contained in:
12
src/locales/en-US.ts
Normal file
12
src/locales/en-US.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import axios from "axios";
|
||||
import {Axios} from "../../config";
|
||||
|
||||
export default async function () {
|
||||
let informations = {}
|
||||
const {data: translations} = await axios.get(Axios.baseURL + 'translations')
|
||||
translations.map((item: any) => {
|
||||
const { code, en } = item
|
||||
informations = { ...informations, [code]: en }
|
||||
})
|
||||
return informations
|
||||
}
|
||||
12
src/locales/fr-FR.ts
Normal file
12
src/locales/fr-FR.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import axios from "axios";
|
||||
import {Axios} from "../../config";
|
||||
|
||||
export default async function () {
|
||||
let informations = {}
|
||||
const {data: translations} = await axios.get(Axios.baseURL + 'translations')
|
||||
translations.map((item: any) => {
|
||||
const { code, fr } = item
|
||||
informations = { ...informations, [code]: fr }
|
||||
})
|
||||
return informations
|
||||
}
|
||||
Reference in New Issue
Block a user