{"id":21043460,"url":"https://github.com/errorpro/react-translator","last_synced_at":"2025-12-27T21:32:05.145Z","repository":{"id":57346662,"uuid":"62503885","full_name":"ErrorPro/react-translator","owner":"ErrorPro","description":"React plugin for multi-languages.","archived":false,"fork":false,"pushed_at":"2016-07-07T08:04:35.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T17:24:22.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ErrorPro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-03T15:52:53.000Z","updated_at":"2017-11-16T01:12:15.000Z","dependencies_parsed_at":"2022-09-15T09:22:22.412Z","dependency_job_id":null,"html_url":"https://github.com/ErrorPro/react-translator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErrorPro%2Freact-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErrorPro%2Freact-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErrorPro%2Freact-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErrorPro%2Freact-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErrorPro","download_url":"https://codeload.github.com/ErrorPro/react-translator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489806,"owners_count":20298997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T14:12:53.651Z","updated_at":"2025-12-27T21:32:05.107Z","avatar_url":"https://github.com/ErrorPro.png","language":"JavaScript","readme":"# React plugin for translations and multi-languages applications.\nThis is a simple plugin for using multi languages in your project.\n## Install\n    npm install react-translator --save\n\n## Example\nThis prugin requires `react` and `redux` libraries.\nFirst of all we need to add a reducer to our store:\n\n    createStore(\n      combineReducers({...reducers, lang: translatorReducer('ru')})\n    )\nthe name of reducer should be `lang`.\n\nUse the plugin in your component:\n\n    import { translator, changeLanguage } from 'react-translation';\n    export default compose(\n      connect(\n        null,\n        { changeLanguage },\n      ),\n      translator({\n        foo: {\n          ru: 'Привет',\n          en: 'Hello',\n          sp: 'Hola',\n        }\n      }),\n    )(MyComponent)\n\nUse your keys as props in your component:\n\n    \u003cdiv\u003e {this.props.foo} \u003c/div\u003e\n    \u003cbutton onClick={() =\u003e this.props.changeLanguage('en')}\u003een\u003c/button\u003e\n    \u003cbutton onClick={() =\u003e this.props.changeLanguage('ru')}\u003eru\u003c/button\u003e\n    \u003cbutton onClick={() =\u003e this.props.changeLanguage('sp')}\u003esp\u003c/button\u003e\n\n[![Example](http://i.makeagif.com/media/7-04-2016/iZqMHr.gif)]()\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrorpro%2Freact-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferrorpro%2Freact-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrorpro%2Freact-translator/lists"}