{"repo":"Ghost---Shadow/i18nize-react","free":true,"listed":false,"github":"https://github.com/Ghost---Shadow/i18nize-react","clone":"git clone https://github.com/Ghost---Shadow/i18nize-react.git","description":"Internationalize react apps within a lunch break","language":"JavaScript","stars":406,"topics":["javascript","abstract-syntax-tree","ast","i18n","react","react-i18n","babel","babel-plugin","i18next"],"license":"MIT","category":"ui-components","readme_excerpt":"i18nize-react Internationalize legacy react apps in a lunch break. i18nize-react finds and replaces all the hardcoded string literals in your react project with i18n bindings. It uses babel to walk on react components and process them. Getting started 1. First install the i18nize-react globally using npm 2. Now in your react app run Tested on i18next other variants should work with minor changes. Make sure there are no unstaged changes, you may need to git reset --hard . 3. Now run. 4. Go for lunch 5. Run your favourite linter to clean things up. 6. It should create four files src/i18n/init.js , src/i18n/keys.js , src/i18n/english.js , src/i18n/chinese.js . Add the line import ./i18n/init.js; in your App's entry point. Usually it is src/index.js . 7. Change the lng key in your browser's local storage to see changes. Contributions Create an issue ticket with a before and after code snippets, before writing any code and raising a PR. For bugs create a minimum reproducible piece of code with original, received and expected snippets. Make sure to read wont-fix.md. Troubleshooting 1. Sometimes i18ize-react might conflict with the babel plugins installed in your project. If that happens go up one folder ( cd .. ) and then run i18ize-react ./your-dir ./your-dir 2. By default i18ize-react assumes that your code is in /src but if you want to change that you can use the third argument. e.g. i18ize-react ./ ./ web will crawl /web instead. 3. Constant initialization outside react lifecyc","default_branch":null,"files":null,"tree":[],"storefront":"/r/Ghost---Shadow","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Ghost---Shadow/i18nize-react/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}