country-name

0.4.0 • Public • Published

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)

Package Sidebar

Install

npm i country-name

Weekly Downloads

3

Version

0.4.0

License

MIT

Last publish

Collaborators

  • mehcode