i18n-country-code

1.0.1 • Public • Published

i18n-country-code

Translations for country names based on its ISO Alpha 3 country code.

Install

$ npm install --save i18n-country-code

Usage

Node.js

const translations = require("i18n-country-code/locales/en.json");
 
const countryName = translations["USA"];
// United States

Webpack

Use it with dynamic import.

const locale = "en"
 
import(`i18n-country-code/locales/${locale}.json`)
  .then(translations => {
    const countryName = translations["USA"];
    // United States
  })

License

MIT © VTEX

Package Sidebar

Install

npm i i18n-country-code

Weekly Downloads

15

Version

1.0.1

License

MIT

Unpacked Size

47.4 kB

Total Files

12

Last publish

Collaborators

  • breno