1.0.1 • Published 5 years ago

i18n-country-code v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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