Skip to content

vtex/i18n-country-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Translations for country codes

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •