{"id":27021181,"url":"https://github.com/general-translation/gt-libraries","last_synced_at":"2025-04-12T20:47:23.111Z","repository":{"id":264120714,"uuid":"891166919","full_name":"General-Translation/gt-libraries","owner":"General-Translation","description":"⚛️ A developer friendly one stop shop to internationalization 🌐","archived":false,"fork":false,"pushed_at":"2025-04-12T03:55:57.000Z","size":17163,"stargazers_count":176,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T20:46:50.362Z","etag":null,"topics":["i18n","internationalization","javascript","l10n","localization","nextjs","react","translation","translations"],"latest_commit_sha":null,"homepage":"https://generaltranslation.com/docs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/General-Translation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-19T21:04:57.000Z","updated_at":"2025-04-12T17:10:18.000Z","dependencies_parsed_at":"2024-12-15T03:23:13.985Z","dependency_job_id":"6e99e088-9836-466a-9bcc-f9056da77449","html_url":"https://github.com/General-Translation/gt-libraries","commit_stats":null,"previous_names":["general-translation/gt-next","general-translation/gt-libraries"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/General-Translation%2Fgt-libraries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/General-Translation%2Fgt-libraries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/General-Translation%2Fgt-libraries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/General-Translation%2Fgt-libraries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/General-Translation","download_url":"https://codeload.github.com/General-Translation/gt-libraries/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631718,"owners_count":21136559,"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","internationalization","javascript","l10n","localization","nextjs","react","translation","translations"],"created_at":"2025-04-04T19:29:42.288Z","updated_at":"2025-04-12T20:47:23.093Z","avatar_url":"https://github.com/General-Translation.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://generaltranslation.com\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://generaltranslation.com/gt-logo-light.svg\" alt=\"General Translation\" width=\"100\" height=\"100\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Overview\n\nGeneral Translation is a **one-stop solution** for all your translation needs. It includes:\n\n- A set of libraries for React and Next.js\n- A translation platform\n- A free AI-powered translation service\n\nWith General Translation, you never need to worry about localization again. Just install the libraries in your project, wrap your content as you code, and we'll take care of the rest.\n\nWith General Translation, you can internationalize your entire app in minutes.\n\nGet started at [generaltranslation.com](https://generaltranslation.com)!\n\nFull documentation, including guides, examples, and API references, can be found in the [docs](https://generaltranslation.com/docs).\n\nJoin our [Discord community](https://discord.gg/W99K6fchSu) to get help and stay updated!\n\n## Library Features\n\n### ⚛️ Translate entire React components, not just strings\n\n- Just wrap your content in a `\u003cT\u003e` component!\n- No need for complex refactoring or messy function calls.\n\n```tsx\nexport default function Page() {\n  return (\n    \u003cT\u003e\n      \u003cp\u003eYou can write any JSX as children of the {'\u003cT\u003e'} component.\u003c/p\u003e\n      \u003cp\u003e\n        For example, you could write a \u003ca href='/'\u003elink\u003c/a\u003e and have the text be\n        translated in context.\n      \u003c/p\u003e\n      \u003cdiv\u003e\n        \u003cdiv\u003e\n          \u003cp\u003eEven deeply nested components are translated in context.\u003c/p\u003e\n          \u003cbutton\u003eClick me!\u003c/button\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/T\u003e\n  );\n}\n```\n\n### 🔎 Feature parity with existing libraries\n\n- GT libraries also support the same features as existing libraries like `i18next`, `react-intl`, and `next-intl`.\n- Features such as dictionaries, plurals, currencies, and automatic routing are all supported.\n\n### 🔧 Developer-friendly\n\n- Setup is simple and can be done in minutes.\n- All GT libraries are open-source and work standalone.\n  - You can use your own translation provider or use our free AI-powered translation service.\n- No more wasting time managing translation keys like `t('menu.header.title')`.\n  - Just write everything in-line!\n\n### 🧠 Free AI-powered translation service\n\n- Translation hot reload in development\n- Libraries integrate natively with our translation platform.\n- Translations are generated for your app in seconds.\n- HTML content is re-arranged and customized according to the language.\n\n## Examples\n\nSee the [examples](examples) directory for some example projects that use our libraries. We currently support React and Next.js.\n\nSimple interface for native pluralization and conditional logic:\n\n```tsx\n\u003cPlural\n  n={count}\n  singular={\u003c\u003eThere is {count} item\u003c/\u003e}\n  plural={\u003c\u003eThere are {count} items\u003c/\u003e}\n/\u003e\n```\n\nSupport for translation at runtime:\n\n```tsx\nexport default function Comment() {\n  const comment = await getComment();\n\n  return (\n    \u003ch1\u003eAuthor: {comment.author}\u003c/h1\u003e\n    \u003cTx\u003e\n      \u003cp\u003e{comment.content}\u003c/p\u003e\n    \u003c/Tx\u003e\n  );\n}\n```\n\nIntuitive i18n formatting syntax:\n\n```tsx\nreturn (\n  \u003cT\u003e\n    \u003ch1\u003e Your account information: \u003c/h1\u003e\n    Account balance: \u003cCurrency\u003e{account.bal}\u003c/Currency\u003e // Currency Formatting\n    \u003cbr /\u003e\n    Updated at: \u003cDateTime\u003e{account.updateTime}\u003c/DateTime\u003e // Datetime Formatting\n    \u003cbr /\u003e\n    Transactions this month: \u003cNum\u003e{account.txCount}\u003c/Num\u003e // Number Formatting\n  \u003c/T\u003e\n);\n```\n\n## Libraries\n\nSee the below for links to the relevant libraries:\n\n- [gt-next](packages/next/README.md): Automatic i18n for Next.js\n- [gt-react](packages/react/README.md): Automatic i18n for React\n- [generaltranslation](packages/core/README.md): Core library for General Translation\n- [supported-locales](packages/supported-locales/README.md): Currently supported locales\n- [gtx-cli](packages/cli/README.md): CLI tool for React apps\n\n## Installation\n\nAny of the libraries can be installed via npm, yarn, pnpm, or bun.\n\nFor example, to install `gt-next`:\n\n```bash\nnpm install gt-next\nyarn add gt-next\n```\n\nUsage of the libraries is documented on our [docs](https://generaltranslation.com/docs).\n\n## Contributing\n\nWe welcome any contributions to our libraries. Please submit a pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneral-translation%2Fgt-libraries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneral-translation%2Fgt-libraries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneral-translation%2Fgt-libraries/lists"}