feat: add vite-plugin-vue-i18n and some updates (#31)

* feat: add vite-plugin-vue-i18n

* feat: add ja locale messages

* refactor: tweak word

* chore: omit yarn.lock

* refactor: move resource importing to i18n.ts

* Restore pnpm-lock.yaml

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
kazuya kawaguchiandAnthony Fu authored and GitHub committed 2021-01-09 23:36:30 +08:00
1 parent 34718353f7
commit cfe924c10d
8 files changed
+46 -21

No files matched your search

+1 -1
View File
@@ -25,13 +25,13 @@
<script setup lang='ts'>
import { useI18n } from 'vue-i18n'
import { locales } from '/~/messages'
import { isDark } from '/~/logics'
const i18n = useI18n()
const toggleLocales = () => {
// change to some real logic
const locales = i18n.availableLocales
i18n.locale.value = locales[(locales.indexOf(i18n.locale.value) + 1) % locales.length]
}