finish localization

This commit is contained in:
liangping
2021-07-22 10:39:17 +08:00
parent cd27cc4e04
commit 3fb71b2dda
16 changed files with 216 additions and 866 deletions
+22
View File
@@ -0,0 +1,22 @@
// import Vue from 'vue'
// import VueI18n from 'vue-i18n'
// Vue.use(VueI18n)
function loadLocaleMessages() {
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
const messages = {}
locales.keys().forEach(key => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
}
})
return messages
}
// export default new VueI18n({
// locale: 'en',
// fallbackLocale: 'en',
// messages: loadLocaleMessages(),
// })
export default loadLocaleMessages()
+14
View File
@@ -0,0 +1,14 @@
{
"message": {
},
"cosmos": "Cosmos Hub",
"kava": "Kava",
"akash": "Akash Decloud",
"iris": "Irisnet",
"staking": "Staking",
"governance": "Governance",
"summary": "Summary",
"blockchains": "Blockchains"
}