{"id":22256929,"url":"https://github.com/telecta/react-i18n","last_synced_at":"2025-07-28T07:31:30.221Z","repository":{"id":29279656,"uuid":"32812390","full_name":"telecta/react-i18n","owner":"telecta","description":"React components to integrate rails-i18n, using i18n-js","archived":false,"fork":false,"pushed_at":"2018-05-18T06:31:08.000Z","size":42,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-17T01:32:08.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telecta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-24T16:59:29.000Z","updated_at":"2024-08-28T02:49:07.000Z","dependencies_parsed_at":"2022-08-29T20:51:36.882Z","dependency_job_id":null,"html_url":"https://github.com/telecta/react-i18n","commit_stats":null,"previous_names":["alvinsj/react-i18n"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Freact-i18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Freact-i18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Freact-i18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telecta%2Freact-i18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telecta","download_url":"https://codeload.github.com/telecta/react-i18n/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227877896,"owners_count":17833559,"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-12-03T08:09:09.949Z","updated_at":"2024-12-03T08:09:10.583Z","avatar_url":"https://github.com/telecta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-i18n\nThis module integrates with [rails-i18n](https://github.com/svenfuchs/rails-i18n) gem, and built as a wrapper on top of [i18n-js](https://github.com/fnando/i18n-js).\n\n## Basic Setup\n### Install module\n\n\t$ npm install --save i18n-js react-i18n\n\t\n\n### Setting up i18n-js\n\nIn Gemfile\n\t\n\tgem 'i18n-js'\n\t\nIn your view *.haml\n\n\t:javascript\n    \tI18n.defaultLocale = \"#{I18n.default_locale}\";\n    \tI18n.locale = \"#{I18n.locale}\";\n    \tI18n.fallbacks = true;\n    \n    = javascript_include_tag \"i18n\"\n\t= javascript_include_tag \"translations\"\n\t\nFor more options/details, please refer to the documentation at [i18n-js](https://github.com/fnando/i18n-js).\n\t\n## Usage\n### React Mixin\n\n\timport ReactI18n from 'react-i18n'\n\t\n\tlet OrderFormButton = React.createClass({\n\t\tmixins: [ReactI18n.Mixin],\n\t\trender () =\u003e {\n\t\t\tlet t = this.getIntlMessage; // ReactI18n method\n\t\t\t\n\t\t\tconsole.log(I18n.locale);\n\t\t\t// \"en\"\n\t\t\t\n\t\t\tconsole.log(I18n.translations); \n\t\t\t// {en: {order_form: { btn_cancel: 'Cancel Order #%{order_id}'}} \n\t\t\t\t\t\t\n\t\t\tlet tOptions = {scope: 'order_form', order_id: this.props.orderId};\n\t\t\treturn (\n\t\t\t\t\u003cbutton\u003e\n\t\t\t\t\t{t('btn_cancel', tOptions)}\n\t\t\t\t\u003c/button\u003e);\n\t\t}\n\t});","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelecta%2Freact-i18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelecta%2Freact-i18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelecta%2Freact-i18n/lists"}