It is a i18n package for weapp, which can help us to switch languages.
It is inspired by Leaflet.i18n, and it is designed in es6, because weapp is compatible with es6.
Config translation words in the json format.
export default {
"en": {
"Weather": "Weather"
},
"zh-Hans": {
"Weather": "天气"
}
}
To set translation words.
To set current language.
To get word you want.
You can check it on weapp-weatherfine. I placed the wxapp-i18n.js into utils folder.