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

i18n-pro

v3.0.0

Published

An out-of-the-box, lightweight JavaScript i18n auto-translation solution

Downloads

1,140

Readme

English | 简体中文

npm-version npm-download

github-stars last-commit github-issues codecov

Vision Features Live Demo Principle Help Document License

Vision

Make internationalization easy and enjoyable 😄💪🏻

Features

  • lightweightbundlesize
  • simple:Simple configuration, quick activation
  • flexible:Supports Variable Interpolation, and unique Type Tag and Formatter
  • automatic-translation:Extract text and generate language pack in one click
    • incremental translation:Only translate new text and remove unused text
    • multi-platform support:For example, translation platforms such as Google x、OpenAI、Google、Microsoft、Tencent、Alibaba Cloud、Youdao、Baidu
    • translation log:Various log outputs make it easy to track issues
  • keylesstext-as-key, custom-key is required in specific scenarios (e.g., polysemy)

Live Demo

Principle

automatic-translation is one of the core features of this library, learn more

The library consists of two main parts

  • Command Line Tool
  • Function API

Command Line Tool:Parse texts requiring translation based on specified rules (regular expressions), translate them using supported platforms, and finally generate language pack files

An example of parsing text using Match Rules is as follows:

The following is an example of text-as-key

// Normal string
t('Hello World')
t("Hello World")
t(`Hello World`)

// Variable Interpolation
t('Hi, {0}', 'developer friends')
t('This is {0}, welcome to {1}. If you think {2}, please give your {3} support', ' `i18n-pro` ', 'use', `it's helpful for you`, ' ⭐️ ')

// Type Tag
t('i18n-pro has reached {n0} users', 100000000) // Number
t('The selling price is {c0}', 14999) // Currency
t(`Today's date is {d0}`, new Date()) // Date
t('Current time: {t0}', new Date()) // Time
t('I have {p0 apple}, {p1 banana} and {p2 pear}', 5, 4, 3) // Plural 

The following is an example of custom-key

// Normal string
t.t('custom-key', 'Hello World')
t.t('custom-key', "Hello World")
t.t('custom-key', `Hello World`)

// Variable Interpolation
t.t('custom-key', 'Hi, {0}', 'developer friends')
t.t('custom-key', 'This is {0}, welcome to {1}. If you think {2}, please give your {3} support', ' `i18n-pro` ', 'use', `it's helpful for you`, ' ⭐️ ')

// Type Tag
t.t('custom-key', 'i18n-pro has reached {n0} users', 100000000) // Number
t.t('custom-key', 'The selling price is {c0}', 14999) // Currency
t.t('custom-key', `Today's date is {d0}`, new Date()) // Date
t.t('custom-key', 'Current time: {t0}', new Date()) // Time
t.t('custom-key', 'I have {p0 apple}, {p1 banana} and {p2 pear}', 5, 4, 3) // Plural 

Function API:Provide multilingual support via initI18n , t , setI18n

  • initI18n:Initialize the configuration and return the API object
  • t:Wrap text to implement internationalization, also serves as command line matching identifier
  • setI18n:Set the language and language pack

Command Line Tool works with Function API and easily integrate into any JavaScript project

Help Document

License

MIT

© 2022-present Eyelly Wu