{"id":17531330,"url":"https://github.com/artembatura/react-localization-experiment","last_synced_at":"2026-01-19T06:32:21.233Z","repository":{"id":40754430,"uuid":"161916877","full_name":"artembatura/react-localization-experiment","owner":"artembatura","description":"Just example how localization can be implemented as alternative to typical Intl.","archived":false,"fork":false,"pushed_at":"2023-01-06T13:26:08.000Z","size":1002,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-28T21:58:25.934Z","etag":null,"topics":["i18n","localization","react","translation"],"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/artembatura.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":"2018-12-15T15:16:03.000Z","updated_at":"2023-03-10T08:10:52.000Z","dependencies_parsed_at":"2023-02-06T04:16:43.428Z","dependency_job_id":null,"html_url":"https://github.com/artembatura/react-localization-experiment","commit_stats":null,"previous_names":["artemirq/react-localization-experiment","artemirq/react-l"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/artembatura/react-localization-experiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembatura%2Freact-localization-experiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembatura%2Freact-localization-experiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembatura%2Freact-localization-experiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembatura%2Freact-localization-experiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artembatura","download_url":"https://codeload.github.com/artembatura/react-localization-experiment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembatura%2Freact-localization-experiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["i18n","localization","react","translation"],"created_at":"2024-10-20T17:23:32.313Z","updated_at":"2026-01-19T06:32:21.214Z","avatar_url":"https://github.com/artembatura.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-localization-experiment\n\nJust example how localization can be implemented in other way in React as alternative to key-value based Intl.\n\n```jsx harmony\nimport React from 'react';\n\nimport { addDictionary, LocaleProvider, L } from 'react-localization-experiment';\n\naddDictionary([\n  {\n    en: \"hello\",\n    ru: \"привет\"\n  },\n  {\n    en: \"world\",\n    ru: \"мир\"\n  }\n]);\n\nconst App = () =\u003e (\n  \u003cLocaleProvider srcLocale=\"en\" locale=\"ru\"\u003e\n    \u003cdiv\u003e\n      \u003cL\u003eHello, world!\u003c/L\u003e\n      {/* Привет, мир! */}\n\n      \u003cL from=\"ru\" to=\"en\"\u003eПривет, мир!\u003c/L\u003e\n      {/* Hello, world! */}\n    \u003c/div\u003e\n  \u003c/LocaleProvider\u003e\n);\n```\n\n[CodeSandbox](https://codesandbox.io/s/w7pmpzzpy5)\n\n## Installation\n\n### npm\n\n```\nnpm i react-localization-experiment\n```\n\n### Yarn\n\n```\nyarn add react-localization-experiment\n```\n\n## API\n\n```typescript\ndeclare function addDictionary(\n  translations: Array\u003c{ [lang: string]: string }\u003e\n): void;\n\ndeclare function translate(\n  text: string,\n  fromLang: string,\n  toLang: string\n): string;\n\ndeclare const LocaleProvider: React.FC\u003c{\n  srcLocale: string;\n  locale: string;\n  children?: any[];\n}\u003e;\n\ndeclare const L: React.FC\u003c{\n  children: string;\n  from: string;\n  to: string;\n}\u003e;\n```\n\n### License\n\n`react-localization-experiment` is [MIT licensed](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartembatura%2Freact-localization-experiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartembatura%2Freact-localization-experiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartembatura%2Freact-localization-experiment/lists"}