iso-639-1-zh

2.0.4 • Public • Published

iso-639-1-zh

NPM Version Build Status Download Count

Chinese name for iso-639-1 languages.
各国语言的中文名称. 例如:zh - 中文; en - 英语; es - 西班牙语;

Installation

npm install iso-639-1-zh

Methods

getZhName(code)

  • @param code {string}
  • @return {string}

Lookup language chinese name by code

getAllZhNames()

  • @return {array}

Get array of all language chinese names

Usage

var ISO639ZH = require('./iso-639-1-zh')

console.log(ISO639ZH.getZhName('zh')) // '中文'
console.log(ISO639ZH.getZhName('es')) // '西班牙语'
console.log(ISO639ZH.getLanguages(['en', 'es']))
// [{code:'en',name:'English',nativeName:'English',zhName:'英语'},{code:'es',name:'Spanish',nativeName:'Español',zhName:'西班牙语'}]

除此之外,还继承了 iso-639-1 模块的所有功能

/iso-639-1-zh/

    Package Sidebar

    Install

    npm i iso-639-1-zh

    Weekly Downloads

    12,214

    Version

    2.0.4

    License

    ISC

    Last publish

    Collaborators

    • meikidd