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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vite-plugin-excel-to-i18n

v0.2.0

Published

Vite plugin to convert Excel files to i18n JSON files

Downloads

3

Readme

vite-plugin-excel-to-i18n

A Vite plugin that converts Excel files to i18n JSON files. Makes translation management easy in multilingual applications.

Features

  • 🚀 Converts Excel and CSV files to i18n JSON files
  • 📱 Real-time updates when source files change
  • 🔄 Supports nested key structures (using '/' or '.' as separators)
  • 🌐 Supports multiple languages

Installation

npm install vite-plugin-excel-to-i18n --save-dev
# or
yarn add vite-plugin-excel-to-i18n -D
# or
pnpm add vite-plugin-excel-to-i18n -D

Usage

Excel File Format

The Excel file should be in the following format:

| category | key | ko | en | ja | ... | |----------|-----|----|----|----|----| | common/button | reset | 초기화 | Reset | リセット | ... | | common.button | next | 다음 | Next | 次へ | ... | | common/button | pre | 이전 | Previous | 前へ | ... | | common.button | button | 버튼 | Button | ボタン | ... |

Note: You can use either '/' or '.' as category separators (e.g., 'common/button' or 'common.button').

CSV File Format

The CSV file should follow the same structure as Excel:

category,key,ko,en,ja
common/button,reset,초기화,Reset,リセット
common.button,next,다음,Next,次へ
common/button,pre,이전,Previous,前へ
common.button,button,버튼,Button,ボタン

Note: UTF-8 with BOM is fully supported to prevent character encoding issues.

vite.config.ts Configuration

import { defineConfig } from 'vite';
import excelToI18n from 'vite-plugin-excel-to-i18n';

export default defineConfig({
  plugins: [
    excelToI18n({
      excelPath: 'src/i18n/language.xlsx',  // .xlsx, .xls 또는 .csv 파일 지원
      outputDir: 'src/i18n/locales',
      supportLanguages: ['ko', 'en', 'ja']
    })
  ]
});

Supported File Types

  • Excel: .xlsx, .xls
  • CSV: .csv

Options

| Option | Type | Description | |------|------|------| | excelPath | string | Path to Excel or CSV file (required) | | outputDir | string | Directory path where i18n JSON files will be saved (required) | | supportLanguages | string[] | Array of supported language codes (required) |

Results

The plugin generates JSON files for each language. It combines category and key into a nested structure:

translation.ko.json

{
  "common": {
    "button": {
      "reset": "초기화",
      "next": "다음",
      "pre": "이전",
      "button": "버튼"
    }
  }
}

translation.en.json

{
  "common": {
    "button": {
      "reset": "Reset",
      "next": "Next",
      "pre": "Previous",
      "button": "Button"
    }
  }
}

translation.ja.json

{
  "common": {
    "button": {
      "reset": "リセット",
      "next": "次へ",
      "pre": "前へ",
      "button": "ボタン"
    }
  }
}

License

MIT