Closed Alex-D closed 3 years ago
Thank you for your feedback!
In vite-plugin-vue-i18n, It's possible technically to support typescript as an i18n resource in vite. However, I fear that supporting typescript will complicate the integration of the resource with the localization service.
Software globalization involves not only us, the developers, but also the translators. Translators generally do not touch the source code directly, but use tools that support editing of localization services and i18n resources.
Given that ecosystem, I'm not keen on supporting .ts
in the i18n resource format either.
If you are using typescript, you are probably using VS code. i18n ally is the best VS code extension for editing i18n resources like json, yaml, etc. This is very useful for completing the key of i18n resources. I recommend you to use this extension. :)
For convenience, I want to put my translations in TypeScript files.
This allow me to:
t
function on my side)So, can I just use TypeScript files and get them eat by the vite plugin? Or should I migrate to JSON5 or something, and create a type for my translation keys?
Thank you :)