{"id":16292463,"url":"https://github.com/exogen/react-html-i18n","last_synced_at":"2025-08-03T00:07:44.495Z","repository":{"id":57158124,"uuid":"307562206","full_name":"exogen/react-html-i18n","owner":"exogen","description":"React internationalization (i18n) with ICU message syntax and HTML support.","archived":false,"fork":false,"pushed_at":"2020-10-30T03:57:34.000Z","size":1309,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-05T18:02:14.715Z","etag":null,"topics":["i18n","icu","internationalization","react","reactjs","translation"],"latest_commit_sha":null,"homepage":"https://exogen.github.io/react-html-i18n/","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/exogen.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":"2020-10-27T02:21:44.000Z","updated_at":"2022-12-05T17:26:39.000Z","dependencies_parsed_at":"2022-08-26T09:31:45.089Z","dependency_job_id":null,"html_url":"https://github.com/exogen/react-html-i18n","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Freact-html-i18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Freact-html-i18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Freact-html-i18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Freact-html-i18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exogen","download_url":"https://codeload.github.com/exogen/react-html-i18n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243271126,"owners_count":20264389,"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":["i18n","icu","internationalization","react","reactjs","translation"],"created_at":"2024-10-10T20:06:46.461Z","updated_at":"2025-03-20T03:30:49.228Z","avatar_url":"https://github.com/exogen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-html-i18n\n\n\u003cdiv align=\"center\"\u003e\n\n**[Demo!](https://exogen.github.io/react-html-i18n/)**\n\n\u003c/div\u003e\n\n- [ICU message format](https://unicode-org.github.io/icu/userguide/format_parse/messages/).\n- Argument values can be React elements.\n- Full HTML support (including attributes).\n- Custom argument formatters.\n- Custom HTML tags and tag overrides.\n- Server-side rendering (SSR) compatible.\n- Fast and [lightweight](https://bundlephobia.com/result?p=react-html-i18n)!\n\n## Install\n\n```console\n$ yarn add react-html-i18n\n```\n\n```console\n$ npm install react-html-i18n\n```\n\n## Motivation\n\nNo other translation library (that I’m aware of) supports both HTML and React\nelements in the same message.\n\nSome libraries support custom tags, like this:\n\n```html\nHello, \u003ctag\u003e{name}\u003c/tag\u003e.\n```\n\nHowever, it’s not really HTML, as translators can’t add attributes, and each tag\nmust have its behavior defined by the programmer. If you only need basic rich\ntext features like bold and italics, that might be good enough. But what if the\ntranslator wants to control the `href` of a link, or add inline `style` to an\nelement?\n\nIf you have an existing collection of translation strings containing HTML,\nyou’re out of luck with most i18n libraries. At best, the ones that support HTML\n(like old versions of `react-intl`) only allow substitution of primitive values.\nThis library supports substitution of any value that React can render –\nincluding React elements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexogen%2Freact-html-i18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexogen%2Freact-html-i18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexogen%2Freact-html-i18n/lists"}