Leon 2 years ago
parent
commit
1e7613e85a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/pages/my.tsx

+ 3 - 2
src/pages/my.tsx

@@ -1,16 +1,17 @@
 import { View, Text } from '@tarojs/components'
 import { useLoad } from '@tarojs/taro'
+import { useTranslation } from 'react-i18next'
 import './my.scss'
 
 export default function Index() {
-
+    const { t } = useTranslation()
   useLoad(() => {
     console.log('Page loaded.')
   })
 
   return (
     <View className='index'>
-      <Text>My!</Text>
+      <Text>{t('languageList.zh')}</Text>
       <Text>abc</Text>
       <Text>123</Text>
     </View>