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

@nitxiodev/next-intl-yaml

v1.1.5

Published

Compile distributed YAML translation files into a generated manifest that can be consumed by [`next-intl`](https://next-intl.dev/) in Next.js App Router projects.

Readme

next-intl-yaml

Compile distributed YAML translation files into a generated manifest that can be consumed by next-intl in Next.js App Router projects.

What it does

  • Scans YAML files with a glob (default: src/**/locales/*.yaml)
  • Generates a TypeScript manifest (default: src/i18n/locales-manifest.ts)
  • Injects Turbopack yaml-loader rule via withNextIntlYaml
  • Works with Next.js HMR/Fast Refresh during development

YAML file convention

Use this naming pattern:

src/<module>/locales/<namespace>.<locale>.yaml

Example:

src/home/locales/hero.en.yaml
src/home/locales/hero.es.yaml
src/checkout/locales/summary.en.yaml

Generated namespaces are PascalCase (hero -> Hero, summary -> Summary).

Install in your Next.js project

Install in the app where you want to consume YAML translations:

[!WARNING] next-intl is required and must be installed in your app. This package declares next-intl as a peer dependency.

pnpm add -D next-intl-yaml

If you use npm or yarn:

npm install -D next-intl-yaml
# or
yarn add -D next-intl-yaml

Setup

1) Configure next.config.ts

This is the mandatory setup. The plugin call in next.config.ts is what enables YAML loading and manifest generation.

import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
import withNextIntlYaml from "next-intl-yaml";

const nextConfig: NextConfig = {
  // regular Next.js config...

  nextIntlYaml: {
    globSource: "src/**/locales/*.yaml",
    manifestOutputPath: "src/i18n/locales-manifest.ts",
    relativeImportPathAlias: "@/",
  },
};

const withNextIntl = createNextIntlPlugin();
export default withNextIntl(withNextIntlYaml(nextConfig));

2) Use generated messages in next-intl request config

import { getRequestConfig } from "next-intl/server";
import { hasLocale } from "next-intl";
import { routing } from "@/i18n/routing";
import { localeYamlMessages } from "@/i18n/locales-manifest";

export default getRequestConfig(async ({ requestLocale }) => {
  const requested = await requestLocale;
  const locale = hasLocale(routing.locales, requested)
    ? requested
    : routing.defaultLocale;

  return {
    locale,
    messages: localeYamlMessages[locale] ?? {},
  };
});