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

Hashing JSON files for i18n #2949

Closed
TheTFo opened this issue Aug 14, 2017 · 1 comment
Closed

Hashing JSON files for i18n #2949

TheTFo opened this issue Aug 14, 2017 · 1 comment

Comments

@TheTFo
Copy link

TheTFo commented Aug 14, 2017

Is this a bug report?

No

Im using i18next with react-18next, and loading my language files over http. Currently my tooling just drops the translation json files into the public directory for easy access. I'm thinking I now need to hash these, similar to the job and css file in the build. Is there a recommended way to about doing this?

My thought is to use a hashing npm package, and export the file names into my code through a module that checks the node environment to return the proper name.

Any thoughts on the best way do this in CRA?

@gaearon
Copy link
Contributor

gaearon commented Jan 8, 2018

I don't have any suggested approach, sorry. Personally I’m concerned about react-i18next since its implementation looks very inefficient. I’d probably suggest trying #1227 (comment) instead.

@gaearon gaearon closed this as completed Jan 8, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants