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

translate-package

v0.0.3

Published

A package for translating i18 objects to other languages

Readme

About Translate-Package

If you are planning to build an application which can support multiple languages, translate-package will help you automate the process of translation of words. With most popular packages that internationalize your application, several resources files should be generated for each language. However, it is most likely that you as a developer do not know all the words you need at all languages, and you might use Google Translate. Translating each word with Google Translate can be very time consuming as well as boring for most, if not all, of developers. Here is where Translate-Package comes into play. Translate-package will get an initial file from the source language you know and generate a source file for all your other desired languages.

Pros

  • Type-Safe
  • Light-weight package
  • Auto-generation of files
  • Supporting dozens of languages

Installation

  • npm

    npm install translate-package
  • yarn

    yarn add translate-package

Usage

First, you need to create a config file named "localize.config.json" in your project's root directory. This config file must contain the following:

  • Address to your source file
  • Address in which files are generated
  • Desired output languages (array of strings)

For Example:

{
  "source": "./test/fa.js",
  "out": "./test",
  "languages": ["en", "fr", "es"]
}

Second, you have to provide your source file, in the directory mentioned in config file.

NOTE!

Your source file must have following features:

  • Be an object
  • A JavaScript File
  • Have an acceptable name, for example: (en.js, fr.js, es.js, ...)

Examples

Source File (in English):

const en = {
  aboutUse: 'about us',
  actions: 'actions',
  address: 'Address',
  air: 'Air',
  all: 'Total',
  amount: 'Amount',
  buy: 'Buy',
  changePassword: 'change Password',
  classic: 'Classic',
  confirm: 'confirm',
  delete: 'Delete',
  edit: 'Edit',
  fee: 'fee',
  method: 'Method',
  price: 'Price',
  search: 'Search',
  type: 'Type',
  yesterday: 'Yesterday',
};

Output File (in French):

const fr = {
  aboutUse: 'à propos de nous',
  actions: "l'opération",
  address: 'Adresse',
  air: 'Air',
  all: 'Le total',
  amount: 'Montant',
  buy: 'Acheter',
  changePassword: 'changer le mot de passe',
  classic: 'Classique',
  confirm: 'Confirmé',
  delete: 'Effacer',
  edit: 'Éditer',
  fee: 'Salaire',
  method: 'Méthode',
  price: 'Prix',
  search: 'Chercher',
  type: 'Taper',
  yesterday: 'Hier',
};

Contact

Amin Jafarlou: [email protected] Project Link: https://github.com/aminjafarlou/translate-package

Acknowledgements