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

@glang/plugin

v1.0.3

Published

A build-time localization plugin for Next.js and Nuxt.js that fetches translations from g.ars.world

Readme

g-lang

npm version License: MIT npm downloads Tests Coverage

A build-time localization solution for modern JavaScript frameworks that automatically fetches and injects translations during the build process.

✨ Features

  • Zero-runtime localization - Translations are injected at build time
  • Simple integration - Works seamlessly with Next.js and Nuxt.js
  • Centralized management - Translations stored on g.ars.world
  • Automatic updates - Fetch latest translations on each build
  • Lightweight - No heavy client-side libraries

🚀 How It Works

g-lang connects to the g.ars.world translation service during your build process:

  1. You provide your api_key and project alias
  2. During build, g-lang fetches translations from https://g.ars.world/<api_key>/<alias>
  3. Translations are injected into your application
  4. All translation keys are replaced with actual translations
  5. The built application contains all translations statically

This approach eliminates the need for client-side translation loading and reduces bundle size.

📦 Installation

npm install @glang/plugin
# or
yarn add @glang/plugin

🔧 Usage

For Next.js

// next.config.js
const Glang = require('@glang/plugin');

module.exports = {
  // ... other config
  plugins: [
    Glang.nextPlugin({
      api_key: 'your_api_key',
      alias: 'your_project_alias',
      outputDir: 'public/locales' // Optional
    })
  ]
};

For Vite

// vite.config.js
import { defineConfig } from 'vite';
import Glang from '@glang/plugin';

export default defineConfig({
  plugins: [
    Glang.vitePlugin({
      api_key: 'your_api_key',
      alias: 'your_project_alias',
      outputDir: 'public/locales' // Optional
    })
  ]
});

For webpack

// webpack.config.js
const Glang = require('@glang/plugin');

module.exports = {
  plugins: [
    new Glang.webpackPlugin({
      api_key: 'your_api_key',
      alias: 'your_project_alias',
      outputDir: 'public/locales' // Optional
    })
  ]
};

For Nuxt.js

// nuxt.config.js
export default defineNuxtConfig({
  // ... other config
  modules: [
    ['@glang/plugin', {
      api_key: 'your_api_key',
      alias: 'your_project_alias',
      outputDir: 'public/locales' // Optional
    }]
  ]
})

Configuration

  • api_key (required) - Your account API key from g.ars.world
  • alias (required) - Your project alias

🌍 Multi-language Support

g-lang automatically handles multi-language projects. Your translations should be structured with language codes as top-level keys:

{
  "en": {
    "welcome": "Welcome",
    "about": "About Us"
  },
  "fr": {
    "welcome": "Bienvenue",
    "about": "À propos"
  }
}

🧪 Testing

The codebase is thoroughly tested to ensure reliability:

  • Unit tests with Jest/Vitest
  • Integration tests for all major frameworks
  • End-to-end testing for critical workflows
  • Code coverage maintained at 90%+

To run tests locally:

npm test
# or
yarn test

💡 Best Practices

Use meaningful keys - Choose translation keys that describe their purpose

Keep translations organized - Group related translations together

Update regularly - Fetch fresh translations during your build process

Fallback language - Always provide complete translations for your default language

Cache wisely - Balance between build performance and translation freshness

🤝 Contributing

We welcome contributions! Please follow these steps:

Fork the repository

Create your feature branch (git checkout -b feature/AmazingFeature)

Commit your changes (git commit -m 'Add some AmazingFeature')

Push to the branch (git push origin feature/AmazingFeature)

Open a Pull Request

📜 License

Distributed under the MIT License. See LICENSE for more information.

📧 Contact

For support or questions, contact us at [email protected]

🙏 Credits

Developed by ARS33 Inspired by modern localization needs Built with ❤️ for the open source community