
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
solid-i18next
Advanced tools
i18next integration for Solid.js with reactive hooks, a Trans component, and built-in Suspense support
Experimental - This library is still in early development. APIs may change and things might be buggy.
i18next integration for Solid.js with reactive hooks, a <Trans> component, and built-in Suspense support.
npm install solid-i18next i18next
import i18next from "i18next";
i18next.init({
lng: "en",
fallbackLng: "en",
resources: {
en: { translation: { welcome: "Welcome, <bold>{{name}}</bold>!" } },
de: { translation: { welcome: "Willkommen, <bold>{{name}}</bold>!" } },
},
});
import { useTranslation } from "solid-i18next";
function App() {
const [t, i18n] = useTranslation();
return (
<div>
<p>{t("welcome", { name: "Alice" })}</p>
<button onClick={() => i18n().changeLanguage("de")}>Deutsch</button>
</div>
);
}
Use <Trans> to embed components inside translations:
import { Trans } from "solid-i18next";
<Trans
key="welcome"
replace={{ name: "Alice" }}
components={{
bold: ({ children }) => <strong>{children}</strong>,
}}
/>
import { I18nextProvider } from "solid-i18next";
<I18nextProvider i18n={i18next}>
<App />
</I18nextProvider>
| Export | Description |
|---|---|
useTranslation(ns?, options?) | Returns [t, i18n, ready]. Loads namespaces reactively and supports Suspense. |
Trans | Component for translations with embedded JSX via components prop. |
I18nextProvider | Context provider to supply a custom i18next instance. |
useI18n | Access the i18next instance from context. |
Contributions are welcome! Feel free to open an issue or submit a pull request.
MIT
FAQs
i18next integration for Solid.js with reactive hooks, a Trans component, and built-in Suspense support
We found that solid-i18next demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.