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

@haykal/i18n-backend

v1.0.0

Published

> Internationalization module with locale management, translation CRUD, namespaced keys, import/export, and missing key detection.

Readme

@haykal/i18n-backend

Internationalization module with locale management, translation CRUD, namespaced keys, import/export, and missing key detection.

Installation

pnpm add @haykal/i18n-backend

Configuration

forRoot() Options

import { I18nModule } from '@haykal/i18n-backend';

@Module({
  imports: [
    I18nModule.forRoot({
      // configuration options
    }),
  ],
})
export class AppModule {}

Key Exports

| Export | Type | Description | | ------------------------ | ------------- | ----------------------------------------------- | | I18nModule | NestJS Module | Main module with forRoot() / forRootAsync() | | TranslationEntity | Entity | Translation entries | | I18N_ENTITIES | Array | Entities for migration discovery | | TranslationsService | Service | Translation CRUD and management | | TranslationsRepository | Repository | Data access layer |

API Endpoints

Base path: /api/i18n and /api/i18n-admin.

Public (i18n)

| Method | Path | Auth | Description | | ------ | ------------------------------- | ------ | -------------------------------------- | | GET | /i18n/locales | Public | List available locales | | GET | /i18n/translations | Public | Get translations for a locale | | GET | /i18n/translations/:namespace | Public | Get translations by locale + namespace |

Admin (i18n-admin)

| Method | Path | Auth | Description | | -------- | ---------------------------------- | ---- | ----------------------------- | | POST | /i18n-admin/translations | JWT | Create a translation entry | | PATCH | /i18n-admin/translations/:id | JWT | Update a translation | | DELETE | /i18n-admin/translations/:id | JWT | Delete a translation | | GET | /i18n-admin/translations/missing | JWT | Find missing translation keys | | GET | /i18n-admin/translations/export | JWT | Export translations | | POST | /i18n-admin/translations/import | JWT | Import translations |

Usage Examples

Using TranslationsService

import { TranslationsService } from '@haykal/i18n-backend';

@Injectable()
export class MyService {
  constructor(private readonly i18n: TranslationsService) {}

  async getGreeting(locale: string) {
    const translations = await this.i18n.getTranslations(locale, 'common');
    return translations['greeting'];
  }
}

Related Packages

  • @haykal/i18n-client — React Query hooks for i18n
  • @haykal/core-backend — Base infrastructure

Further Reading