Comments (10)
anything that will provide possobility to split code and dont use translations directly in components is welcomed, at least this:
also the warning about local and global scope is very annoying
────locales
│
├───en
│ │ common.yaml
│ │ component1.yaml
│ │ component2.yaml
│
├───fr
│ │ common.yaml
│ │ component1.yaml
│ │ component2.yaml
from bundle-tools.
Similar use-case. I'm trying to find a way to accomplish the folder structure below and use the folders as language key so messages
can understand it. I thought about linking everything together in a src/i18n/index.ts
but that is not supported either.
/src/i18n/
│ index.ts
│
│
└───locales
│
├───en-GB
│ │ global.json
│ │
│ ├───components
│ │ Example.json
│
└───nl-NL
│ global.json
│
├───components
│ Example.json
Then something like t('Example.key')
or t('global.key')
should be available.
I'm currently unable to use this plugin because this is a must the project I work in.
from bundle-tools.
This is a very needed feature if splitting code (and locales as well) into multiple modules or plugins.
from bundle-tools.
I've been digging into the code and found that the plugin is overriding resource paths, so only the last include is taken into account
Use instead
resourcePaths = [...resourcePaths, ...(await fg(inc))] ;
This doesn't fix the issue as the language is overriden after this array of language definitions, but I don't understand the code so good to be able to do a pull request
from bundle-tools.
This is a very needed feature if splitting code (and locales as well) into multiple modules or plugins.
It would be really nice indeed to have this working.
from bundle-tools.
i need also code splitting feature, i dont want to use i18n block, and i dont want to have huge files per language
splitting and merging in folder structure is absolutely needed feature
from bundle-tools.
This is a much needed feature for us. Is there a workaround for the meantime?
from bundle-tools.
any comment from creators? any ETA on this?
from bundle-tools.
I would love to see some progress on this matter as well. We are currently planning the transition to unplugin-vue-i18n and this is a major blockage on our roadmap. Any update on PR #274 ?
from bundle-tools.
In what order would the locale files be merged? This matters as duplicate keys would overwrite each other, at least in the implementation of #274.
from bundle-tools.
Related Issues (20)
- Nuxt 3: Unexpected token 'export'. HOT 5
- Indirect dependency semver vulnerable to Regular Expression Denial of Service
- failed to load config vite.config.js HOT 1
- TS error unplugin-vue-i18n 0.12.3 in createI18n HOT 2
- Cannot read properties of undefined (reading 'length') HOT 3
- Improper parsing of linked messages with `-` after 0.12 HOT 2
- @intlify/unplugin-vue-i18n doesn't work with Nuxt 3.7 HOT 1
- Missing dependencies and missing MessageFunctionInternal definition HOT 1
- can not inclue js locale files HOT 2
- Changelog of unplugin-vue-i18n is not up to date HOT 3
- @intlify/unplugin-vue-i18n not support HMR with Static bundle importing HOT 1
- Dependency Dashboard
- Module parse failed: Unexpected token (1:0) when combined with html-webpack-plugin HOT 14
- Failed locale loading: Unexpected token 'const'. HOT 1
- Rollup 4 support HOT 1
- `onlyLocales` not working for SFC <i18n locale="xx">
- it is not installed using npm install HOT 1
- Webpack build does not work together with html-webpack-plugin HOT 2
- Using HTML in SFC results in parsing issue `Unexpected scalar at node end` HOT 1
- nuxt3国际化报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundle-tools.