Initial commit of akmon project
This commit is contained in:
37
pages/info/test/i18n-test.uvue
Normal file
37
pages/info/test/i18n-test.uvue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<view class="i18n-test-page">
|
||||
<view class="section">
|
||||
<text class="section-title">{{ $t('mt.title.news') }}</text>
|
||||
<text class="section-desc">{{ $t('prev') }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
|
||||
import { tt } from '@/utils/i18nfun.uts'
|
||||
// 也可在脚本中直接调用 tSmart,参数智能判断
|
||||
const techCategory = tt('prev')
|
||||
console.log(techCategory)
|
||||
// const enLang = tSmart('prev', 'en-US')
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.i18n-test-page {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.section-desc {
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user