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

@pulimoodan/localiser

v1.0.3

Published

AI-powered internationalization tool that automatically translates JSON locale files using OpenAI's GPT-4 model

Downloads

25

Readme

Localiser

An AI-powered internationalization tool that automatically translates JSON locale files using OpenAI's GPT-4 model. Localiser supports batch translation across multiple languages and namespaces with a simple CLI interface.

Features

  • 🤖 AI-Powered Translation: Uses OpenAI's GPT-4 for high-quality translations
  • 📁 Namespace Management: Organize translations by namespaces (e.g., home, settings, common)
  • 📊 Real-time Progress: Visual progress bars showing translation status
  • CLI Interface: Simple command-line interface for easy integration
  • 🔧 Configurable: Flexible configuration through JSON files

To Do

  • 🗂️ Dynamic folder structure support: Now supports lang/namespace.json, lang.json is not supported yet
  • 💿 Optimized translation: Translate only missing keys in the target language files (add a flag to override existing translations)
  • 🤖 AI Model selection: Allow users to choose between different OpenAI models (e.g., GPT-3.5, GPT-4)
  • 🎬 Init command: Add a command to initialize the project with default configuration json file

Feel free to contribute to the project by submitting issues or pull requests!

Installation

Prerequisites

  • Node.js (v16 or higher)
  • OpenAI API key (Add this to .env file of your project)

Install Globally

npm install -g @pulimoodan/localiser

Configuration

Environment Variables

Create a .env file in your project root:

OPENAI_API_KEY=your_openai_api_key_here

Project Configuration

Create a localiser.json file to configure your translation settings:

{
  "directory": "public/locales",
  "sourceLanguage": "en",
  "languages": ["fr", "es", "de", "it", "pt", "zh", "ja", "ru"],
  "namespaces": ["home", "settings"]
}

Configuration Options

  • directory: Path to your locales directory
  • sourceLanguage: Source language code (e.g., "en")
  • languages: Array of target language codes to translate to
  • namespaces: Array of namespace names to translate

Usage

Basic Usage

Translate all configured languages and namespaces:

loaliser

Translate Specific Language

loaliser --language fr,es

Translate Specific Namespaces

loaliser --namespace home,settings

Translate Specific Language and Namespace

loaliser --language fr --namespace home

Custom Configuration File

localiser --config custom-config.json

CLI Options

| Option | Short | Description | Default | | ------------- | ----- | -------------------------------- | ------------------------- | | --language | -l | Target languages code | All configured languages | | --namespace | -n | Specific namespaces to translate | All configured namespaces | | --config | -c | Path to configuration file | localiser.json |

Dependencies

  • commander: CLI argument parsing
  • dotenv: Environment variable management
  • fs-extra: Enhanced file system operations
  • openai: OpenAI API client

License

ISC License

Author

pulimoodan

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions, please open an issue on the GitHub repository.