[Feature Request]YAML Locales Support
See original GitHub issueIs your feature request related to a problem? Please describe.
https://github.com/nuxt-community/i18n-module/blob/master/src/templates/utils.js#L31
const langFileModule = await import(/* webpackChunkName: "lang-[request]" */ `~/<%= options.langDir %>${file}`)
const getter = langFileModule.default || langFileModule
messages = typeof getter === 'function' ? await Promise.resolve(getter(context, locale)) : getter
i found that locales are imported as js/json files. but yaml
format files are more lighter.
Describe the solution you’d like
add a check, when pass in yaml files use yaml-parser to load them.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Allow explicit exclusion of locales in CLI & its yml file · Issue ...
I'd really appreciate it if I could exclude specific locales from push and pull when using the CLI, at least when pulling. I...
Read more >Support YAML anchors in the CLI | Cloud Feature Requests ...
The local build tool/CLI/build-agent doesn't support YAML anchors and aliases. This was confirmed by a customer and Lev.
Read more >[Feature Request] i18n.te doesnt look for global locales -
Not sure if this a bug or a feature, but when I'm trying to check if global translation exists, te returns false for...
Read more >Descriptor Format of Catalog Entities - Backstage.io
The descriptor format supports substitutions using $text , $json , and $yaml . Placeholders like $json: https://example.com/entity.json are substituted by the ...
Read more >Issues - GitLab Docs
Discuss the implementation of an idea. Track tasks and work status. Accept feature proposals, questions, support requests, or bug reports. Elaborate on code ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
moreover, if support multiple files will be more better
like:
I can confirm that using the “default” yaml rule breaks i18n blocks. I was able to resolve this by only applying the yaml-loader rule to my
locales/
directory, like so:Now, I can import locales from yaml files in
locales/
and still use i18n blocks. I think this or a better solution should be mentioned in the docs. If you like my approach, I can file a PR to add a new guide to the docs. Let me know what you think!Also, happy holidays!