0.4.0 • Published 7 years ago

country-name v0.4.0

Weekly downloads
95
License
MIT
Repository
github
Last release
7 years ago

Country Name

Simple getter for country names in all languages (backed by a script that dumps data direct from the CLDR).

Install

npm i country-name --save

Usage

import countryName from "country-name";

// countryName( 3-LETTER COUNTRY CODE , LANGUAGE SUBTAG )
countryName("USA", "en"); // United States
countryName("USA", "ja"); // アメリカ合衆国
countryName("JPN", "en"); // Japan
countryName("JPN", "ja"); // 日本

Contributing

Pull requests are always welcome.

  • Some method of only including a set of langauges rather than ALL of them (maybe package.json based config)
  • Remote loading of data (would fair better for websites)