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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lan-json-translate

v1.6.1

Published

json file translation

Downloads

22

Readme

lan-json-translate

vue项目多语言JSON文件翻译 language json file translation

Usage

  • 安装
npm i lan-json-translate --save-dev
  • 添加命令脚本 scripts/lanTrans.js
const translate = require('lan-json-translate')

let lanList = [ // 翻译生成语言简称列表
  'en',
  'ko'
]

translate(
  './src/locales', // 语言文件目录 (当前命令行相对路径)
  'zh-TW', // 源语言简称 (会从./src/locales/zh-tw.json读取数据)
  lanList
  )
  • 修改package.json
{
  "scripts": {
    "lan-trans": "node ./scripts/lanTrans.js"
  }
}
  • 运行
npm run lan-trans

语言简称列表

语言简写 | 名称 | :-: | :-: | auto | 自动检测 | af | 南非荷兰语 sq | 阿尔巴尼亚人 am | 阿姆哈拉语 ar | 阿拉伯 hy | 亚美尼亚 az | Aserbajni eu | 巴斯克 be | 白俄罗斯 bn | 孟加拉 bs | 波斯尼亚 bg | 保加利亚语 ca | 加泰罗尼亚 ceb | 宿务 zh-CN | 简体中文 zh-TW | 繁体中文 co | 科西嘉 hr | 克罗地亚 cs | 捷克 da | 丹麦 nl | 荷兰人 en | 英语 eo | 世界语 et | 爱沙尼亚语 fi | 芬兰 fr | 法国 fy | 弗里斯兰 gl | 加利西亚 ka | 格鲁吉亚 de | 德语 el | 希腊语 gu | 古吉拉特语 ht | 海地克里奥尔语 ha | 豪萨语 haw | 夏威夷 iw | 希伯来语 hmn | 苗族 hu | 匈牙利 is | 冰岛的 ig | 伊博 id | 印度尼西亚 ga | 爱尔兰的 it | 意大利 ja | 日本 jw | 爪哇 kn | 卡纳达语 kk | 哈萨克人 km | 高棉 ko | 朝鲜的 ku | 库尔德 ky | 吉尔吉斯 la | 拉丁 lv | 拉脱维亚 lt | 立陶宛 lb | 卢森堡 mk | 马其顿 mg | 马尔加什 ms | 马来语 ml | 马拉雅拉姆语 mt | 马耳他语 mi | 毛利 mr | 马拉 mn | 蒙 my | 缅甸(缅甸) ne | 尼泊尔 no | 挪威 ny | 海(英语) ps | 普什图语 fa | 波斯语 pl | 抛光 pt | 葡萄牙语(葡萄牙,巴西) pa | 旁遮普 ro | 罗马尼亚 ru | 俄语 sm | 萨摩亚 gd | 苏格兰盖尔语 sr | 塞尔维亚 st | 塞索托语 sn | 绍纳语 sd | 信德 si | 僧伽罗语(僧伽罗语) sk | 斯洛伐克 sl | 斯洛文尼亚 so | 索马里 es | 西班牙语 su | 巽 sw | 斯瓦希里 sv | 瑞典 tl | 菲律宾语(菲律宾语) tg | 塔吉克 ta | 泰米尔人 te | 泰卢固语 th | 泰国 tr | 土耳其 uk | 乌克兰 ur | 乌尔都语 uz | 乌兹别克 vi | 越南 cy | 威尔士语 xh | 科萨 yi | 意第绪语 yo | 约鲁巴 zu | 祖鲁