vue-i18n
vue-i18n copied to clipboard
feature: add support for multi locale file
trafficstars
Clear and concise description of the problem
I'm currently working on a project that implements feature/domain based architecture. My goal is to define a separate locale for each domain.
At the end of the job, all local files can be merged into a single file. It doesn't matter. The important thing is to be able to manage piecemeal works during the development phase.
Currently when I define a config like below (with vite plugin), it only accepts the last uploaded file.
import { URL, fileURLToPath } from "url";
import { dirname, resolve } from "path";
import { defineConfig } from "vite";
import vueI18n from "@intlify/vite-plugin-vue-i18n";
export default defineConfig({
plugins: [
vueI18n({
include: resolve(
dirname(fileURLToPath(import.meta.url)),
"./**/locales/*"
),
})
]
})
I need a file structure like below:
- src
- - domains
- - - domain1
- - - - locales
- - - - - en.json
- - - - - tr.json
- - - domain2
- - - - locales
- - - - - en.json
- - - - - tr.json
Suggested solution
If there are files with the same name during upload, they can be merged.
Alternative
No response
Additional context
No response
Validations
- [X] Read the Contributing Guidelines
- [X] Read the Documentation
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.