
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@hotosm/iso-countries-languages
Advanced tools
ISO 639-1 languages and ISO 3166-1 countries translated in the languages required by Tasking Manager
This library provides the full list of ISO 639-1 languages and the full list of ISO 3166-1 countries. The library supports 89 languages (the full list is available by querying the library API itself) and it is designed to be easy to import and use.
Simply run the following code and look at the examples to see typical usages:
yarn add @hotosm/iso-countries-languages
This library includes data for more than 150 languages. To make the build smaller, we have only 24 languages enabled, but you can easily build that package with more languages enabled. Follow those steps:
yarn all
To update the countries data from OpenStreetMap, execute yarn update-countries
.
Returns the list of supported languages.
var isoCountriesLanguages = require('iso-countries-languages');
var supportedLangs = isoCountriesLanguages.getSupportedLangs();
console.log("Supported languages: ");
console.log(supportedLangs);
Supported languages:
[ 'af',
'am',
'ar',
'az',
'ba',
...
'udm',
'uk',
'ur',
'uz',
'vi',
'xh',
'yi',
'zh' ]
Returns the ISO 3166-1 list of countries translated in the language passed as a parameter.
var isoCountriesLanguages = require('iso-countries-languages');
var countriesInFrench = isoCountriesLanguages.getCountries('fr');
console.log("Countries in french: ");
console.log(countriesInFrench);
Countries in french:
{ AF: 'Afghanistan',
AX: 'Les Îles D\'Åland',
AL: 'L\'albanie',
DZ: 'L\'algérie',
AS: 'Samoa Américaines',
AD: 'Andorre',
...
WF: 'Wallis-et-Futuna',
EH: 'Sahara Occidental',
YE: 'Yémen',
ZM: 'La zambie',
ZW: 'Zimbabwe' }
Returns the translation for the country code passed as a parameter in the language passed as a parameter.
var isoCountriesLanguages = require('iso-countries-languages');
var italyInFrench = isoCountriesLanguages.getCountry('fr', 'IT');
console.log("Italy in french: ");
console.log(italyInFrench);
Italy in french:
Italie
Returns the ISO 639-1 list of languages translated in the language passed as a parameter
var isoCountriesLanguages = require('iso-countries-languages');
var languagesInItalian = isoCountriesLanguages.getLanguages('it');
console.log("Languages in italian: ");
console.log(languagesInItalian);
Languages in italian:
{ ab: 'Di abcasia',
aa: 'Lontano',
af: 'Afrikaans',
ak: 'Akan',
sq: 'Albanese',
am: 'Amarico',
ar: 'Arabo',
...
xh: 'Xhosa',
yi: 'Yiddish',
yo: 'Yoruba',
za: 'Zhuang, Chuang',
zu: 'Zulu' }
Returns the translation for the language code passed as a parameter in the language passed as a parameter
var isoCountriesLanguages = require('iso-countries-languages');
var spanishInItalian = isoCountriesLanguages.getLanguage('it', 'es');
console.log("Spanish in italian: ");
console.log(spanishInItalian);
Spanish in italian:
Spagnolo
MIT License
The country names included in this project came from OpenStreetMap. The data is made available under ODbL.
FAQs
ISO 639-1 languages and ISO 3166-1 countries translated in the languages required by Tasking Manager
The npm package @hotosm/iso-countries-languages receives a total of 330 weekly downloads. As such, @hotosm/iso-countries-languages popularity was classified as not popular.
We found that @hotosm/iso-countries-languages demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.