Can't find info on the mapping of include
to the keys of locals
#81
josh-hemphill
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I might have just missed it somewhere, but from the template I used it seems like the locale name is derived from the file name.
I'm trying to adapt a project template to use another library that can pull from vue-i18n, but which needs it's own namespace in the locales files, but would add a substantial amount to them, so I'm trying to figure out if I can put them in directories and have the namespace inferred from that.
After looking at the source code, I can see that it is the case that it only uses the file name to assign the locale, and discarding all other path info. If it's okay, I'm going to take a look to see where it might make sense to better document that, and submit a PR.
I think I also saw an issue about merging of locale files; would it make sense to add the ability to provide an array of include configurations that are objects and can support config options on how to treat the additional data (by merging or namespacing, and what kind of pattern to use)?
Beta Was this translation helpful? Give feedback.
All reactions