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

chki18n

v0.3.0

Published

A command-line tool that validates multilingual translation files against i18n (Internationalization) standards.

Readme

chki18n

license Commit Count npm downloads npm latest package npm bundle size Followers Stars

Check and verify your i18n translation files

chki18n is a command-line tool that validates multilingual translation files against i18n (Internationalization) standards.

It automatically detects common mistakes that can occur when managing multilingual files and suggests ways to improve them. With this tool, you can validate files in advance within CI environments or other automated workflows.

Currently, only the json format and single translation files (ko.json, en.json, etc.) are supported.

Features

  • [x] Analysis of i18n translation files in json format
  • [x] File validation and scanning for various issues
  • [x] CI & CLI & Node.js support
  • [x] TypeScript & Modern ESM Module
  • [ ] Support for more i18n file types
  • [ ] Language detection during parsing
  • [ ] More detailed and clear error messages (e.g. bulleted list)
  • [ ] Check for more languages
  • [ ] Add unit tests
  • [ ] Single Test (Test Function by Item)
  • [ ] Performance Improvements
  • [ ] Generate Report File
  • [ ] Automatic correction for certain tests

This tool does not provide automatic text translation. It only performs checks.

Verification List

| Level | Check code | Reason | | --- | --- | --- | | Error | INVALID_FILE | Missing files, parsing failure... | | Error | NO_KEY | The 'a' key, which exists in Language A, is missing in Language B | | Error | NO_INTERPOLATION_KEY | The dynamic string (interpolation key) does not match the primary locale or is missing. | | Warning | EMPTY_VALUE | The key is defined, but its value is empty. | | Warning | DUPLICATE_VALUE | They use different keys but the same value | | Warning | NOT_TRANSLATED_VALUE | This is the same as the text in the target language. It appears that the translation has not been completed. | | Warning | DUMMY_KEY | This key does not exist in the target language and is therefore not used. |

How-to-use (CLI)

Below are examples of scannable files:

# ko.json
{
  "desc": {
    "hello": "안녕하세요"
  }
}

# en.json
{
  "desc": {
    "hello": "Hello"
  }
}

You can verify the validity of these files using the command below:

$ npx chki18n {targetDirectory}
# With options
$ npx chki18n --path {targetDirectory}

The output will then appear in the terminal as follows. If a validity issue occurs, the process will generate an error and terminate abruptly.

 Translation  INFO  Process to check valid translation...
 Translation  ERROR  Some translation files did not include the following keys:

 Translation  ERROR  The job was aborted due to an invalid translation file. See above issues.

How-to-use (via JavaScript/Node.js)

This module can be installed and used directly via JavaScript code as well as through the CLI!

Install the module using the command below:

# using npm
$ npm install chki18n
# or using pnpm
$ pnpm install chki18n
# or using yarn
$ yarn add chki18n

You can use it as shown below.

Unlike the CLI output, the result is returned in object format. The console does not display progress or results.

import { checkTranslationFiles } from 'chki18n';

const result = await checkTranslationFiles('/your/locale/directory', {
	/* Options here */
	target: 'en',
	debug: false
});

console.log(result);
/*
{
  success: false,
  issues: {
    NOT_TRANSLATED_VALUE: [
      {
        locale: 'ko',
        key: 'desc.no-str',
        value: '12345',
        targetValue: '12345',
        level: 'warn',
        code: 'NOT_TRANSLATED_VALUE'
      }
    ],
    NO_KEY: [
      {
        locale: 'ko',
        key: 'attr.folder',
        value: undefined,
        targetValue: 'Folder',
        level: 'error',
        code: 'NO_KEY'
      }
    ]
  }
}
*/

Options

Usage: `chki18n [options]` or `chki18n [options] <targetDirectory>`

Options:
	--path	The directory where the files to be scanned are located (Required)
	--target	The contents of the language file are compared with the language specified here. Typically, language codes such as `ko`, `en`, `zh-Hans`, `zh-Hant`, `zh`, and `ja` are used. (Default: `en`)
	--no-warn	Do not show warning messages
	--debug	Show debug messages

Contributing

Anyone can contribute to the project by reporting new issues or submitting a pull request. For more information, please see CONTRIBUTING.md.

License

Please see the LICENSE file for more information about project owners, usage rights, and more.