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

@cookieyes/translations

v0.5.0

Published

Curated translation catalog for the CookieYes consent SDK. Import only the locales you need — each is its own sub-path so unused languages don't bundle.

Readme


This package only provides locale strings — for which API to use to read consent status, see the shared decision tree.

Key features

  • Five locales — English (en), Spanish (es), French (fr), German (de), Italian (it).
  • Tree-shakeable — per-locale sub-path exports; import one language, ship only that one.
  • Complete TranslationMap — every string the banner, preferences dialog, and opt-out use.
  • Drop-in — pass straight to initCookieYes({ i18n: { messages } }); no adapter needed.

Prerequisites

Quick start

1. Install

npm install @cookieyes/translations
pnpm add @cookieyes/translations
yarn add @cookieyes/translations
bun add @cookieyes/translations

2. Import the locales you need (each is a named export):

import { en } from "@cookieyes/translations/en";
import { fr } from "@cookieyes/translations/fr";

3. Pass them to the SDK via initCookieYes:

import { initCookieYes } from "@cookieyes/react"; // or @cookieyes/core / @cookieyes/nextjs

initCookieYes({
  mode: "cookie-only", // no backend
  i18n: {
    messages: { en, fr },
    locale: "fr", // active locale; omit to auto-detect from the browser
  },
});

4. Done. The banner and dialogs now render in the selected locale.

Available locales

| Sub-path | Language | |----------|----------| | @cookieyes/translations/en | English | | @cookieyes/translations/es | Spanish | | @cookieyes/translations/fr | French | | @cookieyes/translations/de | German | | @cookieyes/translations/it | Italian |

The package root (@cookieyes/translations) re-exports shared types only — locale tables are not re-exported there, so importing one language never pulls in the others.

Troubleshooting

Cannot find module '@cookieyes/translations' (or a locale sub-path). Import from the sub-path, not the root: @cookieyes/translations/fr, not @cookieyes/translations. The root exports types only. Available sub-paths are en, es, fr, de, it — any other path won't resolve.

Text doesn't change after I pass a locale. Make sure the imported locale is actually placed in i18n.messages and selected via i18n.locale (e.g. { messages: { en, fr }, locale: "fr" }). If you only pass messages without locale, the SDK auto-detects from the browser and may not pick the one you expect. The runtime is a singleton — changing the config after the first initCookieYes(...) call has no effect until the runtime is reset.

Still stuck? Open an issue.

Community & support

(A community chat channel is on the roadmap.)

Contributing

Contributions are welcome — new locales especially. Read our Contributing Guidelines and Code of Conduct, then open a pull request.

Security

Found a vulnerability? Do not open a public issue — follow our Security Policy and use GitHub's private vulnerability reporting.

License

MIT — see LICENSE.