{"_id":"@apiglot/solidjs","_rev":"4-4671ff0dcba984cbf0c5e621afc73d34","name":"@apiglot/solidjs","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@apiglot/solidjs","version":"0.1.0","keywords":["solid"],"author":{"name":"Apiglot"},"license":"MIT","_id":"@apiglot/solidjs@0.1.0","maintainers":[{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"}],"contributors":[],"homepage":"https://github.com/apiglot/solidjs#readme","bugs":{"url":"https://github.com/apiglot/solidjs/issues"},"dist":{"shasum":"6a48b93e05f50ad84d8423f90cfc72f1b649e7a6","tarball":"https://registry.npmjs.org/@apiglot/solidjs/-/solidjs-0.1.0.tgz","fileCount":11,"integrity":"sha512-bswZ+oaKjPbCWfCu+9ii5fY+u4nDVhhV5kcHwDfGTv+NcjRW+gLEBNzlSKMK3fneB3MSg/Qgh2wgx5S7tm4JEA==","signatures":[{"sig":"MEUCIQDb7omM1dPCrL0IIaj2q4FMzYw83PRERLbjtvI0Z1RUVQIgQ5INRMkzWnoKnI4eQLGWPYFiItvUJOHvUePrpxDSp6Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27261},"main":"./dist/index/index.js","type":"module","types":"./dist/index/index.d.ts","module":"./dist/index/index.js","browser":{},"engines":{"node":">=18","pnpm":">=9.0.0"},"exports":{".":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/index.js"},"development":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/dev.js"}}},"./i18next":{"solid":{"import":"./dist/i18next/index.jsx","development":"./dist/i18next/dev.jsx"},"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/index.js"},"development":{"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/dev.js"}}}},"private":false,"scripts":{"dev":"vite serve dev","lint":"concurrently pnpm:lint:*","test":"concurrently pnpm:test:*","build":"tsup","format":"prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"","test:ssr":"pnpm run test:client --mode ssr","lint:code":"eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}","lint:types":"tsc --noEmit","test:client":"vitest","update-deps":"pnpm up -Li","prepublishOnly":"pnpm build"},"_npmUser":{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"},"repository":{"url":"git+https://github.com/apiglot/solidjs.git","type":"git"},"_npmVersion":"10.9.2","description":"SolidJS library with tools and artifacts to help you internationalize your SolidJS applications.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"i18next":"^25.7.4","i18next-http-backend":"^3.0.2"},"typesVersions":{"*":{"i18next":["./dist/i18next/index.d.ts"]}},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.1","devDependencies":{"tsup":"^8.0.2","vite":"^5.2.11","jsdom":"^24.0.0","eslint":"^8.56.0","vitest":"^1.6.0","esbuild":"^0.21.3","prettier":"3.0.0","solid-js":"^1.8.17","typescript":"^5.4.5","@types/node":"^20.12.12","concurrently":"^8.2.2","tsup-preset-solid":"^2.2.0","vite-plugin-solid":"^2.10.2","esbuild-plugin-solid":"^0.6.0","@typescript-eslint/parser":"^7.9.0","eslint-plugin-no-only-tests":"^3.1.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"peerDependencies":{"solid-js":"^1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/solidjs_0.1.0_1776690526706_0.9908654900553557","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@apiglot/solidjs","version":"0.1.1","keywords":["solid"],"author":{"name":"Apiglot"},"license":"MIT","_id":"@apiglot/solidjs@0.1.1","maintainers":[{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"}],"contributors":[],"homepage":"https://github.com/apiglot/solidjs#readme","bugs":{"url":"https://github.com/apiglot/solidjs/issues"},"dist":{"shasum":"f13491792622b21922c8acca6045102cfa4724b3","tarball":"https://registry.npmjs.org/@apiglot/solidjs/-/solidjs-0.1.1.tgz","fileCount":12,"integrity":"sha512-wOIWUVfKFv3c+ewwnpANdSnhYeQ11q+XhR/MkEBQWrawPibk8V0ib2dx85CdA97TA/ZHHBYcL+Ki7hV6/bSFdQ==","signatures":[{"sig":"MEUCIHV9xMMzmIfCg6V2rbjqItQJ/N1fgARe9DRXPSfnlf8tAiEAqbUykLGymOdYVmVuEHp1qsbkyUrW8t76m784RQ6x7JE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31725},"main":"./dist/index/index.js","type":"module","types":"./dist/index/index.d.ts","module":"./dist/index/index.js","browser":{},"engines":{"node":">=18","pnpm":">=9.0.0"},"exports":{".":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/index.js"},"development":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/dev.js"}}},"./i18next":{"solid":{"import":"./dist/i18next/index.jsx","development":"./dist/i18next/dev.jsx"},"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/index.js"},"development":{"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/dev.js"}}}},"private":false,"scripts":{"dev":"vite serve dev","lint":"concurrently pnpm:lint:*","test":"concurrently pnpm:test:*","build":"tsup","format":"prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"","test:ssr":"pnpm run test:client --mode ssr","lint:code":"eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}","lint:types":"tsc --noEmit","test:client":"vitest","update-deps":"pnpm up -Li","prepublishOnly":"pnpm build"},"_npmUser":{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"},"repository":{"url":"git+https://github.com/apiglot/solidjs.git","type":"git"},"_npmVersion":"10.9.2","description":"SolidJS library with tools and artifacts to help you internationalize your SolidJS applications.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"i18next":"^25.7.4","i18next-http-backend":"^3.0.2"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"i18next":["./dist/i18next/index.d.ts"]}},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.1","devDependencies":{"tsup":"^8.0.2","vite":"^5.2.11","jsdom":"^24.0.0","eslint":"^8.56.0","vitest":"^1.6.0","esbuild":"^0.21.3","prettier":"3.0.0","solid-js":"^1.8.17","typescript":"^5.4.5","@types/node":"^20.12.12","concurrently":"^8.2.2","tsup-preset-solid":"^2.2.0","vite-plugin-solid":"^2.10.2","esbuild-plugin-solid":"^0.6.0","@typescript-eslint/parser":"^7.9.0","eslint-plugin-no-only-tests":"^3.1.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"peerDependencies":{"solid-js":"^1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/solidjs_0.1.1_1776692083065_0.07495259649493824","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@apiglot/solidjs","version":"0.2.0","keywords":["solid"],"author":{"name":"Apiglot"},"license":"MIT","_id":"@apiglot/solidjs@0.2.0","maintainers":[{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"}],"contributors":[],"homepage":"https://github.com/apiglot/solidjs#readme","bugs":{"url":"https://github.com/apiglot/solidjs/issues"},"dist":{"shasum":"23bc142ba4daeb42b00f1fd9f793ad4520a2a188","tarball":"https://registry.npmjs.org/@apiglot/solidjs/-/solidjs-0.2.0.tgz","fileCount":12,"integrity":"sha512-D1R77YKpubu+61ywCHIHbt8MEXsb+pez1ordsHt2nH9HYsT88XcZJYaiNUQ7F6sw8HxBAZl8Ir8Ejt9VJpPA1A==","signatures":[{"sig":"MEQCID+FXccGmYh91kMylamzrSrrtpt4qj25D/a7aBoiUPxiAiAWJB3+7SWyxRlTgNIudNcgJ5FvZurvzkjMgWqFIPqjcw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34129},"main":"./dist/index/index.js","type":"module","_from":"file:apiglot-solidjs-0.2.0.tgz","types":"./dist/index/index.d.ts","module":"./dist/index/index.js","browser":{},"engines":{"node":">=18","pnpm":">=9.0.0"},"exports":{".":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/index.js"},"development":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/dev.js"}}},"./i18next":{"solid":{"import":"./dist/i18next/index.jsx","development":"./dist/i18next/dev.jsx"},"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/index.js"},"development":{"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/dev.js"}}}},"private":false,"scripts":{"dev":"vite serve dev","lint":"concurrently pnpm:lint:*","test":"concurrently pnpm:test:*","build":"tsup","format":"prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"","test:ssr":"pnpm run test:client --mode ssr","lint:code":"eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}","lint:types":"tsc --noEmit","test:client":"vitest","update-deps":"pnpm up -Li"},"_npmUser":{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"},"_resolved":"/tmp/12cb3c672147f052544b082745274289/apiglot-solidjs-0.2.0.tgz","_integrity":"sha512-D1R77YKpubu+61ywCHIHbt8MEXsb+pez1ordsHt2nH9HYsT88XcZJYaiNUQ7F6sw8HxBAZl8Ir8Ejt9VJpPA1A==","repository":{"url":"git+https://github.com/apiglot/solidjs.git","type":"git"},"_npmVersion":"10.9.2","description":"SolidJS library with tools and artifacts to help you internationalize your SolidJS applications.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"i18next-http-backend":"^4.0.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"i18next":["./dist/i18next/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","vite":"^5.2.11","jsdom":"^24.0.0","eslint":"^8.56.0","vitest":"^1.6.0","esbuild":"^0.21.3","i18next":"^26.2.0","prettier":"3.0.0","solid-js":"^1.8.17","typescript":"^5.4.5","@types/node":"^20.12.12","concurrently":"^8.2.2","tsup-preset-solid":"^2.2.0","vite-plugin-solid":"^2.10.2","esbuild-plugin-solid":"^0.6.0","@typescript-eslint/parser":"^7.9.0","eslint-plugin-no-only-tests":"^3.1.0","eslint-plugin-eslint-comments":"^3.2.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"peerDependencies":{"i18next":"^26.2.0","solid-js":"^1.6.0"},"_npmOperationalInternal":{"tmp":"tmp/solidjs_0.2.0_1779203372097_0.3525302018896501","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@apiglot/solidjs","version":"0.3.0","publishConfig":{"access":"public"},"description":"SolidJS library with tools and artifacts to help you internationalize your SolidJS applications.","license":"MIT","author":{"name":"Apiglot"},"contributors":[],"repository":{"type":"git","url":"git+https://github.com/apiglot/solidjs.git"},"homepage":"https://github.com/apiglot/solidjs#readme","bugs":{"url":"https://github.com/apiglot/solidjs/issues"},"private":false,"sideEffects":false,"type":"module","main":"./dist/index/index.js","module":"./dist/index/index.js","types":"./dist/index/index.d.ts","browser":{},"exports":{".":{"development":{"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/dev.js"}},"import":{"types":"./dist/index/index.d.ts","default":"./dist/index/index.js"}},"./i18next":{"solid":{"development":"./dist/i18next/dev.jsx","import":"./dist/i18next/index.jsx"},"development":{"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/dev.js"}},"import":{"types":"./dist/i18next/index.d.ts","default":"./dist/i18next/index.js"}}},"typesVersions":{"*":{"i18next":["./dist/i18next/index.d.ts"]}},"peerDependencies":{"i18next":"^26.2.0","solid-js":"^1.6.0"},"devDependencies":{"@types/node":"^20.12.12","@typescript-eslint/eslint-plugin":"^7.9.0","@typescript-eslint/parser":"^7.9.0","concurrently":"^8.2.2","esbuild":"^0.21.3","esbuild-plugin-solid":"^0.6.0","eslint":"^8.56.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-no-only-tests":"^3.1.0","i18next":"^26.2.0","jsdom":"^24.0.0","prettier":"3.0.0","solid-js":"^1.8.17","tsup":"^8.0.2","tsup-preset-solid":"^2.2.0","typescript":"^5.4.5","vite":"^5.2.11","vite-plugin-solid":"^2.10.2","vitest":"^1.6.0"},"keywords":["solid"],"engines":{"node":">=18","pnpm":">=9.0.0"},"dependencies":{"i18next-http-backend":"^4.0.0"},"scripts":{"dev":"vite serve dev","build":"tsup","test":"concurrently pnpm:test:*","test:client":"vitest","test:ssr":"pnpm run test:client --mode ssr","format":"prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"","lint":"concurrently pnpm:lint:*","lint:code":"eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}","lint:types":"tsc --noEmit","update-deps":"pnpm up -Li"},"_id":"@apiglot/solidjs@0.3.0","_integrity":"sha512-zmbXqfKYtf0QrpoPeHb87PHxdvFlaaxy+Xx4/Rm9UK9CFdVV0oPtBaT5UvngyVHA1M2kolB+XmakqgSyk3Nf7g==","_resolved":"/tmp/86ec2adcf89529b4370e2780a291a36f/apiglot-solidjs-0.3.0.tgz","_from":"file:apiglot-solidjs-0.3.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-zmbXqfKYtf0QrpoPeHb87PHxdvFlaaxy+Xx4/Rm9UK9CFdVV0oPtBaT5UvngyVHA1M2kolB+XmakqgSyk3Nf7g==","shasum":"6ce4db0f48e7819b1cb8d771918eae86e024c778","tarball":"https://registry.npmjs.org/@apiglot/solidjs/-/solidjs-0.3.0.tgz","fileCount":12,"unpackedSize":43103,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGB6yY+no+e6zxe4ixMHoXv1Mj949XQle0JWOcFHc3ptAiBBu1VO4OYENu/3/W2vr1+U106E23lalMscPpizSVGt7A=="}]},"_npmUser":{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"},"directories":{},"maintainers":[{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/solidjs_0.3.0_1781480658039_0.8403006774852069"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-20T13:08:46.617Z","modified":"2026-06-14T23:44:18.287Z","0.1.0":"2026-04-20T13:08:46.831Z","0.1.1":"2026-04-20T13:34:43.213Z","0.2.0":"2026-05-19T15:09:32.268Z","0.3.0":"2026-06-14T23:44:18.175Z"},"bugs":{"url":"https://github.com/apiglot/solidjs/issues"},"author":{"name":"Apiglot"},"license":"MIT","homepage":"https://github.com/apiglot/solidjs#readme","keywords":["solid"],"repository":{"type":"git","url":"git+https://github.com/apiglot/solidjs.git"},"description":"SolidJS library with tools and artifacts to help you internationalize your SolidJS applications.","contributors":[],"maintainers":[{"name":"edulco","email":"eduardo.rodriguez.dasilva@gmail.com"}],"readme":"# @apiglot/solidjs\n\nThin SolidJS wrappers around popular i18n libraries, powered by [Apiglot](https://apiglot.com).\n\nCurrently supported:\n\n- [i18next](#i18next-wrapper) - the most popular i18n library for JavaScript\n\nPlanned:\n\n- [@solid-primitives/i18n](https://primitives.solidjs.community/package/i18n)\n\n## Installation\n\n```bash\nnpm install i18next @apiglot/solidjs\n# or\npnpm add i18next @apiglot/solidjs\n# or\nyarn add i18next @apiglot/solidjs\n```\n\n**Peer dependency:** `solid-js` >= 1.6.0\n\n## i18next Wrapper\n\n### Setup\n\nWrap your app with the `I18NextContext` provider, passing your Apiglot project credentials:\n\n```tsx\nimport { render } from 'solid-js/web';\nimport { I18NextContext } from '@apiglot/solidjs/i18next';\nimport App from './App';\n\nrender(\n  () => (\n    <I18NextContext\n      projectId=\"your-project-id\"\n      apiKey=\"your-api-key\"\n    >\n      <App />\n    </I18NextContext>\n  ),\n  document.getElementById('root')!\n);\n```\n\n#### Provider Props\n\n| Prop | Type | Required | Description |\n|------|------|----------|-------------|\n| `projectId` | `string` | Yes | Your Apiglot project ID |\n| `apiKey` | `string` | Yes | Your Apiglot API key |\n| `host` | `string` | No | Custom API host (defaults to `https://api.apiglot.com`) |\n| `debug` | `boolean` | No | Enable i18next debug mode |\n\n### Usage in Components\n\n#### `useTranslation` hook\n\nThe primary way to translate text. Optionally pass a namespace to load.\n\n```tsx\nimport { useTranslation } from '@apiglot/solidjs/i18next';\n\nfunction Greeting() {\n  const { t } = useTranslation('common');\n\n  return (\n    <div>\n      <h1>{t('welcome_title')}</h1>\n      <p>{t('welcome_message', 'Welcome!')}</p>\n    </div>\n  );\n}\n```\n\nThe second argument to `t()` can be a default value string or an i18next options object:\n\n```tsx\nconst { t } = useTranslation('common');\n\n// With a default value\nt('greeting', 'Hello!')\n\n// With i18next interpolation options\nt('greeting_name', { name: 'World' })\n```\n\n#### HTML in translations\n\nTranslations can contain HTML tags, and those tags can even reference SolidJS components.\n\nSuppose a translation has the following source text:\n\n```html\nDon't have an account? <A href=\"/signup\" class=\"text-primary hover:underline\">Sign up!</A>\n```\n\nTo render it, pass `renderHtml: true` in the options. If the markup references SolidJS components (like `A`, the anchor component from `@solidjs/router`), provide a `components` mapping so each tag name resolves to its component:\n\n```tsx\nimport { A } from '@solidjs/router';\nimport { useTranslation } from '@apiglot/solidjs/i18next';\n\nfunction SignupPrompt() {\n  const { t } = useTranslation('auth');\n\n  return <p>{t('signup', { renderHtml: true, components: { A } })}</p>;\n}\n```\n\nTwo things are required for this to work:\n\n- `renderHtml` must be set. Otherwise the HTML tags are escaped and shown to the user as plain text.\n- If the translation uses SolidJS components, a `components` mapping must be provided in the options, keyed by the tag names used in the translation.\n\n#### `Translateable` component (deprecated)\n\nA declarative alternative to the `useTranslation` hook:\n\n```tsx\nimport { Translateable } from '@apiglot/solidjs/i18next';\n\nfunction ProductCard() {\n  return (\n    <div>\n      <Translateable key=\"product.title\" namespace=\"shop\" />\n      <Translateable\n        key=\"product.description\"\n        namespace=\"shop\"\n        placeholders={{ price: '9.99', currency: 'USD' }}\n      />\n      <Translateable\n        key=\"product.disclaimer\"\n        namespace=\"shop\"\n        renderHtml={true}\n      />\n    </div>\n  );\n}\n```\n\n| Prop | Type | Required | Description |\n|------|------|----------|-------------|\n| `key` | `string` | Yes | Translation key |\n| `namespace` | `string \\| string[]` | No | Namespace(s) to load |\n| `placeholders` | `Record<string, any>` | No | Interpolation values |\n| `renderHtml` | `boolean` | No | Render HTML tags in the translation string (default: `false`) |\n\n> [!NOTE]\n> Since version `0.3` the `t` function can also render HTML and even SolidJS components, which deprecates\n> the `Translateable` component. We will likely remove the component in future versions, unless we find a\n> new use case that makes it more appropiate than the `t` function.\n\n#### `LanguageSwitch` component\n\nA ready-made `<select>` dropdown for switching languages. It automatically lists all languages configured in your Apiglot project.\n\n```tsx\nimport { LanguageSwitch } from '@apiglot/solidjs/i18next';\n\nfunction Header() {\n  return (\n    <nav>\n      <h1>My App</h1>\n      <LanguageSwitch class=\"lang-picker\" />\n    </nav>\n  );\n}\n```\n\nIt accepts all standard `<select>` HTML attributes.\n\n#### `useI18Next` hook\n\nFor advanced use cases, access the full context object:\n\n```tsx\nimport { useI18Next } from '@apiglot/solidjs/i18next';\n\nfunction LanguageInfo() {\n  const ctx = useI18Next();\n\n  return (\n    <div>\n      <p>Current language: {ctx?.currentLanguage()}</p>\n      <p>Available: {ctx?.languages().map(l => l.name).join(', ')}</p>\n      <button onClick={() => ctx?.changeLanguage('es')}>\n        Switch to Spanish\n      </button>\n    </div>\n  );\n}\n```\n\nThe context object provides:\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `loading` | `Accessor<boolean>` | Whether project info is still loading |\n| `languages` | `Accessor<Language[]>` | All available languages |\n| `currentLanguage` | `Accessor<string \\| null>` | Current language code |\n| `changeLanguage` | `(langCode: string) => Promise<void>` | Switch the active language |\n| `loadNamespace` | `(ns: string \\| string[]) => Promise<void>` | Load additional namespace(s) |\n| `loadRawJson` | `(langCode: string, ns: string) => Promise<Record<string, any>>` | Fetch raw translation JSON |\n| `i18next` | `i18next` | The underlying i18next instance |\n\n## TypeScript\n\n`@apiglot/solidjs/i18next` ships with a `Resources` interface that you can augment via [TypeScript module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) to get autocompletion and type-checking on namespaces and translation keys.\n\nEach key in `Resources` is a namespace, and its value is a union of all translation keys in that namespace:\n\n```ts\n// src/types/apiglot.d.ts\ndeclare module '@apiglot/solidjs/i18next' {\n  interface Resources {\n    common: 'welcome_title' | 'welcome_message' | 'logout_button';\n    shop: 'product.title' | 'product.description' | 'product.disclaimer';\n  }\n}\n```\n\nOnce augmented, `useTranslation` will narrow the namespace and key types based on your declarations:\n\n```tsx\nconst { t } = useTranslation('common');\n\nt('welcome_title');   // ✅ ok\nt('logout_button');   // ✅ ok\nt('product.title');   // ❌ Type error — not a key of the 'common' namespace\n\nconst { t: t2 } = useTranslation('unknown'); // ❌ Type error — not a declared namespace\n```\n\n### Generating types automatically\n\nMaintaining the `Resources` interface by hand is tedious and gets out of sync quickly. The [Apiglot CLI](https://www.npmjs.com/package/@apiglot/cli) can introspect your Apiglot project and generate the augmentation file for you:\n\n```bash\nnpx apiglot i18next types\n```\n\nRun it after adding or renaming keys in Apiglot (and ideally as a step in your CI or pre-build script) to keep the type definitions in sync with your project.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}