推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.0 KiB

---
description:
globs:
alwaysApply: true
---
## 当前项目是uniapp开发微信小程序
在你修改locale下的json文件需要根据文件路径进行国际化配置
例如:
文件路径
/components/active/active-item
/pages/index/index
/pages/index/center
/pages_login/wxLogin
en.json
{
"components" : {
"active" : {
"active_item" : {
...
}
}
},
"pages" : {
"index" : {
...
},
"center" : {
...
},
},
"pages_login" : {
"wxLogin" : {
...
},
},
}
并且在国际化替换内容的位置需要留有中文版的注释内容
国际化对象需要在objectLangMap.json中配置,将后端对象多个不同语言的字段进行关联,而不是国际化成中文
例如:
{
//国际化活动
"active" : {
"title" : {
"zh-Hans" : "title",
"en" : "enTitle",
},
...
}
}
使用方式
<view>$ot(item, 'active', 'title')</view>