{"id":15573066,"url":"https://github.com/jcquintas/ni18n","last_synced_at":"2025-08-22T00:31:01.241Z","repository":{"id":40359763,"uuid":"376967588","full_name":"JCQuintas/ni18n","owner":"JCQuintas","description":"Simple and powerful i18next integration for next.js","archived":false,"fork":false,"pushed_at":"2023-04-21T10:04:14.000Z","size":2465,"stargazers_count":46,"open_issues_count":13,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T17:28:04.799Z","etag":null,"topics":["i18n","i18next","next","next-i18next","nextjs","react","react-i18next","ssg","ssr","translation"],"latest_commit_sha":null,"homepage":"https://jcquintas.gitbook.io/ni18n/","language":"TypeScript","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/JCQuintas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["JCQuintas"]}},"created_at":"2021-06-14T22:05:31.000Z","updated_at":"2024-06-19T02:49:37.293Z","dependencies_parsed_at":"2024-06-19T02:48:57.203Z","dependency_job_id":"a2d21271-febf-4aa8-9829-5f36a4910fda","html_url":"https://github.com/JCQuintas/ni18n","commit_stats":{"total_commits":258,"total_committers":4,"mean_commits":64.5,"dds":"0.15503875968992253","last_synced_commit":"0d0129d2b1a3127c9a4730a8c47bf950cad65c07"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCQuintas%2Fni18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCQuintas%2Fni18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCQuintas%2Fni18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCQuintas%2Fni18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JCQuintas","download_url":"https://codeload.github.com/JCQuintas/ni18n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542288,"owners_count":18242332,"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","i18next","next","next-i18next","nextjs","react","react-i18next","ssg","ssr","translation"],"created_at":"2024-10-02T18:10:20.787Z","updated_at":"2024-12-20T06:06:28.248Z","avatar_url":"https://github.com/JCQuintas.png","language":"TypeScript","funding_links":["https://github.com/sponsors/JCQuintas"],"categories":[],"sub_categories":[],"readme":"# Ni18n\n\nIs an easy to use integration for [Next.js](https://nextjs.org/) to enable [i18next](https://www.i18next.com/) translations on your application with support for SSR, SSG and Client translation loading.\n\n\u003cimg height=\"150px\" width=\"300px\" src=\"./.github/assets/logo.svg\" /\u003e\n\nIt gives you freedom to use `i18next` with a lot of different customizations, while still being compatible with `next.js`.\n\n`Ni18n` also does not directly depend on `i18next` nor `react-i18next`, allowing you to update these dependencies without having to wait for any action on our part.\n\n- [Installing](#installing)\n- [Getting Started](./docs/usage/getting-started.md)\n- [Examples](./docs/examples.md)\n- [F.A.Q.](./docs/faq.md)\n\n## Installing\n\n```bash\nyarn add i18next react-i18next ni18n\n```\n\n```bash\nnpm install i18next react-i18next ni18n\n```\n\n```typescript\nimport {\n  appWithI18Next,\n  loadTranslations,\n  clientNamespaces,\n  useSyncLanguage,\n} from 'ni18n'\n```\n\n## Getting Started\n\nRead the docs at [Getting Started](./docs/usage/getting-started.md) or on the website [https://jcquintas.gitbook.io/ni18n/usage/getting-started](https://jcquintas.gitbook.io/ni18n/usage/getting-started)\n\n## Known Issues\n\nWhen running on Vercel we are unable to load the translation files automatically because the [vercel/nft](https://github.com/vercel/nft) package doesn't bundle files requested by a third party lib.\n\nA work around is to create a wrapper around `loadTranslations` that calls `path.resolve('./', './public/locales')`, and then use this function instead of the exported by the `ni18n` package.\n\n```typescript\nimport { loadTranslations as ni18nLoadTranslations } from 'ni18n'\nimport { ni18nConfig } from '../ni18n.config'\n\nexport const loadTranslations = async (\n  initialLocale?: string | undefined,\n  namespacesNeeded?: NamespacesNeeded | undefined,\n) =\u003e {\n  const locales = path.resolve('./', './public/locales')\n\n  return await ni18nLoadTranslations(\n    ni18nConfig,\n    initialLocale,\n    namespacesNeeded,\n  )\n}\n```\n\nYou can read more on [#49](https://github.com/JCQuintas/ni18n/issues/49)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcquintas%2Fni18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcquintas%2Fni18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcquintas%2Fni18n/lists"}