Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use regex in path to match subdirectory? #239

Open
zd-project opened this issue May 28, 2019 · 1 comment
Open

Use regex in path to match subdirectory? #239

zd-project opened this issue May 28, 2019 · 1 comment

Comments

@zd-project
Copy link

Looks like the loadPath only accepts string or lookup function and the interpolator only populates language and namespace option. There seems not to be a way to match files in subdirectory via regex. I'm wondering how to elegantly handle look up in subdirectories since I would like to organize my translation files into subdirectories rather than putting them all into one big directory.

@jamuhl
Copy link
Member

jamuhl commented May 29, 2019

We personally use /locales/{{lng}}/{{ns}}.json -> everything outside that can be done using the function which gets lng, ns -> every other structure you need to get yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants