You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, this is a great repo, thank you. I haven't been able to figure out if namespace support for i18next configured repos is possible. If not, I'll describe my use case and how I think it could be implemented.
My source translation files are split across several namespaces such as:
en/common.json
en/notfound.json
en/whitepaper.json
It's important for me to split up into namespaces so that I only load what is needed on a page by page basis, as some files can get big (whitepaper).
This could be configured in a namespaces key in the config, and supporting a glob for the files.format.include. This would iterate through the glob matches, and execute the run command but for each namespace detected, if configured. In addition to replacing [locale], the [ns] would also be replaced in the target path, if configured.
Alternatively, I could re-run the CLI command multiple times, one for each namespace, and dynamically load the namespace each time into the include string but native namespace support would be nice.
The text was updated successfully, but these errors were encountered:
As a workaround, you can add all of our namespace entry points into the files.[format].include part of the config config one by one, and that should do the trick at least until better support is implemented :)
Hello, this is a great repo, thank you. I haven't been able to figure out if namespace support for
i18next
configured repos is possible. If not, I'll describe my use case and how I think it could be implemented.My source translation files are split across several namespaces such as:
It's important for me to split up into namespaces so that I only load what is needed on a page by page basis, as some files can get big (whitepaper).
This could be configured in a
namespaces
key in the config, and supporting a glob for thefiles.format.include
. This would iterate through the glob matches, and execute therun
command but for each namespace detected, if configured. In addition to replacing [locale], the [ns] would also be replaced in the target path, if configured.Alternatively, I could re-run the CLI command multiple times, one for each namespace, and dynamically load the namespace each time into the include string but native namespace support would be nice.
The text was updated successfully, but these errors were encountered: