support i18n
This commit is contained in:
parent
0603bbb064
commit
e2ceff4a4d
|
@ -13,7 +13,7 @@ const menuItems = [
|
|||
]
|
||||
|
||||
const docItems = [
|
||||
{ name: 'Anouncement', icon: '', path: '' },
|
||||
{ name: 'Announcement', icon: '', path: '' },
|
||||
{ name: 'FAQ', icon: '', path: '' },
|
||||
{ name: 'Tutorial', icon: '', path: '' },
|
||||
]
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
import i18n from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
|
||||
const resources = {
|
||||
en: {
|
||||
translation: {
|
||||
home: 'Home',
|
||||
farm: 'farm',
|
||||
announcement: 'Announcement',
|
||||
faq: 'FAQ',
|
||||
tutorial: 'tutorial',
|
||||
connectWallet: 'Connect Wallet',
|
||||
tvl: 'TVL',
|
||||
totalUsersEarned: 'Total Users Earned',
|
||||
personalTvl: 'Personal TVL',
|
||||
totalPersonalEarned: 'Total Personal Earned',
|
||||
harvest: 'Harvest',
|
||||
apy: 'APY',
|
||||
compoundInterest: 'Compound Interest',
|
||||
deposite: 'Deposite',
|
||||
vl: 'VL',
|
||||
remaining: 'Remaining',
|
||||
withdrawal: 'Withdrawal',
|
||||
mining: 'Mining',
|
||||
defiFarm: 'Defi Farm',
|
||||
multiChainLockupValue: 'Multi-chain Lock-up Value',
|
||||
multiChainUserRevenue: 'Multi-chain User Revenue',
|
||||
miningOutput: 'Mining Output',
|
||||
miningOutputValue: 'Mining Output Value',
|
||||
multiChainReward: 'Multi-chain Reward',
|
||||
multiChainBurned: 'Multi-chain Burned',
|
||||
more: 'More',
|
||||
partners: 'Partners',
|
||||
auditors: 'Auditors',
|
||||
}
|
||||
},
|
||||
fr: {
|
||||
translation: {
|
||||
|
||||
}
|
||||
},
|
||||
tw: {
|
||||
translation: {
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
resources,
|
||||
lng: 'en', // language to use.
|
||||
fallbackLng: 'en',
|
||||
debug: process.env.NODE_ENV === 'development',
|
||||
interpolation: {
|
||||
escapeValue: false
|
||||
}
|
||||
})
|
||||
|
||||
export default i18n;
|
|
@ -1,6 +1,7 @@
|
|||
import { ColorModeScript } from '@chakra-ui/react';
|
||||
import React, { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import i18n from './i18'
|
||||
import App from './App';
|
||||
import { Home, Farm } from './pages'
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
|
|
Loading…
Reference in New Issue