feat: 演示i18n
This commit is contained in:
parent
09477e60eb
commit
3c2d52e060
@ -1,8 +1,8 @@
|
||||
{
|
||||
"tabbar.home": "Home",
|
||||
"tabbar.about": "About",
|
||||
"app.name": "En Title",
|
||||
"weight": "{heavy}KG",
|
||||
"weight2": "{0}KG",
|
||||
"introduction": "I am {name},height:{detail.height},weight:{detail.weight}",
|
||||
"app.name": "En Title"
|
||||
"detail": "{0}cm, {1}KG",
|
||||
"introduction": "I am {name},height:{detail.height},weight:{detail.weight}"
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
"tabbar.about": "关于",
|
||||
"app.name": "中文标题",
|
||||
"weight": "{heavy}公斤",
|
||||
"introduction": "我是 {name},身高:{detail.height},体重:{detail.weight}",
|
||||
"weight2": "{0}公斤"
|
||||
"detail": "{0}cm, {1}公斤",
|
||||
"introduction": "我是 {name},身高:{detail.height},体重:{detail.weight}"
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
<view class="text-green-500">多语言测试</view>
|
||||
<view class="m-4">{{ $t('app.name') }}</view>
|
||||
<view class="m-4">{{ $t('weight', { heavy: 100 }) }}</view>
|
||||
<view class="m-4">{{ formatString(translate('weight2'), 100) }}</view>
|
||||
<view class="m-4">{{ formatString(translate('detail'), 175, 60) }}</view>
|
||||
<view class="m-4">
|
||||
{{ formatI18n(translate('introduction'), user) }}
|
||||
</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user