bundle-tools
bundle-tools copied to clipboard
possible to include .js instead of .json in SFC (block)?
Currently the i18n block allow specifying a .json file as the source like so:
<i18n src="./common/locales.json"></i18n>
But as the dynamic feature of this issue is not yet implemented, I was wondering if there was a workaround by importing a .js file that exports the object like so:
//langVar.js
import langVar from './myComponent/langVar/index.json'
export default {
langVar: langVar
}
and then in my component import langVar.js
, either by:
<i18n src="./langVar.js"></i18n>
or in some other fashion? I need to keep my language files for the component separate to support my language translation system, which is why I need this.
need this feature too :D
Me too!!!, Hope gets added soon!
Would be indeed awesome to have this!
vue-i18n-loader will be deprecated near the future We can use unplugin-vue-i18n Thanks
vue-i18n-loader will be deprecated near the future We can use unplugin-vue-i18n Thanks
Are there any examples for this? I can't find any here: unplugin-vue-i18n