Skip to content

Storing translation as JSON files (without TS sugar) #182

Closed Answered by lukashroch
cheburan asked this question in Ideas
Discussion options

You must be logged in to vote

Maintaining lang files will become a chore once the numbers grow, that's for sure. Especially when there are lots of moving parts.

Having translations as JSON files should be fine though. I think it's already supported and new vue-i18n for Vue3 might actually have better TS support for JSON (https://vue-i18n.intlify.dev/guide/advanced/typescript.html) also vue-i18n bundler https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n

I wouldn't duplicate number of files, like having both common.ts and common.json, you can just have latter and load then from top level. Basically, convert .ts to .json.

So the only thing I would watch out is not to introduce some unnecassary i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lukashroch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants