npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@simple-module-py/i18n

v0.0.15

Published

i18next + react-i18next glue for simple_module apps — hooks, namespace conventions, locale wiring

Readme

@simple-module-py/i18n

i18next + react-i18next glue for simple_module apps. Ships an i18next instance pre-configured for the framework's per-module locale conventions (<module>.<key> namespacing, CLDR plurals, cookie-driven locale switching).

Install

npm install @simple-module-py/i18n

Peer-depends on React 19. Runtime deps i18next and react-i18next install automatically.

What it provides

  • createI18n({ locale, resources }) — returns a configured i18next instance.
  • <I18nProvider> — React context provider; plug it at the root of your Inertia app.
  • useT(namespace?) — hook returning the translation function, scoped if you pass a namespace.
  • withNamespace(ns) — higher-order helper for components that want a stable namespace binding.

Usage

Root setup (in client_app/main.tsx):

import { createI18n, I18nProvider } from "@simple-module-py/i18n";

const i18n = createI18n({
  locale: window.__INITIAL_LOCALE__ ?? "en",
  resources: window.__I18N_RESOURCES__, // provided by InertiaLayoutDataMiddleware
});

function Root({ App, props }) {
  return (
    <I18nProvider i18n={i18n}>
      <App {...props} />
    </I18nProvider>
  );
}

In a module page:

import { useT } from "@simple-module-py/i18n";

export default function Browse() {
  const t = useT("orders");
  return <h1>{t("browse.title")}</h1>;  // resolves to orders.browse.title
}

Important: when using zod schemas with translated messages, build the schema inside a component that calls useT() — never at module scope. Schemas constructed at import time freeze against the first render's locale.

Depends on

  • i18next, react-i18next
  • Peer: react ^19.0.0

License

MIT — see LICENSE.