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

@marbulinek/translatte

v1.0.1

Published

Automated translation generator for JavaScript/TypeScript projects (Angular, React, Vue) using Lingva Translate API

Readme

TransLatté

npm version License: MIT Node.js Version Coverage Status

Automatic translation file generator for JavaScript/TypeScript projects.

Install

npm install --save-dev @marbulinek/translatte

Or globally:

npm install -g @marbulinek/translatte

Usage

  1. Run npx translatte init and edit the generated config file.
  2. Add your source translation file (e.g., src/i18n/en.json).
  3. Run npx translatte generate to create translations.

Command-line:

translatte generate --source en --targets es,fr,de --input ./src/i18n/en.json --output ./src/i18n

As npm script:

Add to your package.json:

{
  "scripts": {
    "translate": "npm run translatte generate"
  }
}

Then run:

npm run translate

Configuration

TransLatté uses a translatte.config.json file for configuration. Run npx translatte init to create one.

Basic Configuration

For a single translation source:

{
  "sourceLanguage": "en",
  "targetLanguages": ["es", "fr", "de", "it", "pt", "ja", "zh"],
  "inputFile": "./src/assets/i18n/en.json",
  "outputDir": "./src/assets/i18n"
}

Configuration Options:

  • sourceLanguage: The language code of your source translations (e.g., "en")
  • targetLanguages: Array of language codes to translate to
  • inputFile: Path to your source translation file
  • outputDir: Directory where translated files will be created
  • lingvaInstance: (Optional) Custom Lingva instance URL
  • preserveInterpolation: (Optional) Keep interpolation placeholders untranslated (default: true)
  • interpolationPattern: (Optional) Regex pattern to match placeholders
  • enableCache: (Optional) Enable translation caching for faster re-runs (default: true)

Multi-Module Configuration

For modular applications (Angular feature modules, React code-splitting, etc.):

{
  "sourceLanguage": "en",
  "targetLanguages": ["es", "fr", "de", "it"],
  "sources": [
    {
      "name": "Core Module",
      "inputFile": "./src/assets/i18n/en.json",
      "outputDir": "./src/assets/i18n"
    },
    {
      "name": "Auth Module",
      "inputFile": "./src/app/auth/i18n/en.json",
      "outputDir": "./src/app/auth/i18n"
    },
    {
      "name": "Dashboard Module",
      "inputFile": "./src/app/dashboard/i18n/en.json",
      "outputDir": "./src/app/dashboard/i18n"
    }
  ]
}

Multi-Module Options:

  • sources: Array of translation sources, each with:
    • name: Descriptive name for the module
    • inputFile: Path to the module's source translation file
    • outputDir: Directory for the module's translated files

Placeholder/Interpolation Support

TransLatté preserves common interpolation patterns used by popular i18n libraries:

  • Angular/ngx-translate: {{ variable }}
  • React-i18next: {{variable}}
  • Vue-i18n: {variable}
  • Custom patterns: %variable%, ${variable}, $variable$

Example translation file with placeholders:

{
  "GREETINGS": {
    "HELLO": "Hello {{name}}!",
    "WELCOME": "Welcome back, {username}",
    "GOOD_MORNING": "Good morning, ${user}!"
  },
  "MESSAGES": {
    "ITEMS_COUNT": "You have {count} items in your cart",
    "PRICE": "Total price: {{currency}}{{amount}}"
  }
}

See the examples/ folder for more configuration examples and sample translation files.

License

MIT TransLatté supports multiple translation sources - perfect for modular applications (Angular feature modules, React code-splitting, etc.)!