🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

iso-language-codes

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-language-codes

ISO 639-1, -2/T and -2/B codes with names

2.0.0
latest
Source
npm
Version published
Weekly downloads
13K
-1.25%
Maintainers
1
Weekly downloads
 
Created
Source
Test coverageThanks
StatementsBranchesFunctionsLines"Buy Me A Coffee"

ISO language codes

Based on https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Install
	npm i iso-language-codes
Example
	import codes, {by639_1, by639_2T, by639_2B} from 'iso-language-codes'
	var code

	code = codes[0]
	//code is
	{ 	
		name: 'Serbian',
		nativeName: 'српски језик',
		iso639_1: 'sr',
		iso639_2T: 'srp',
		iso639_2B: 'srp'
	}

	code = by639_1['en']
	//code is
	{ 	
		name: 'English',
		nativeName: 'English',
		iso639_1: 'en',
		iso639_2T: 'eng',
		iso639_2B: 'eng'
	}

	code = iso639_2T['fra']
	//code is
	{
		name: 'French',
		nativeName: 'français, langue française',
		iso639_1: 'fr',
		iso639_2T: 'fra',
		iso639_2B: 'fre'
	}

	//get an array of all iso639_2B codes:
	var code2BList = Object.keys(iso639_2B)

Example (CommonJS)

	const codes = require('iso-language-codes');
	const {by639_1, by639_2T, by639_2B} = codes;

	//see first example above for usage ...

Keywords

ISO

FAQs

Package last updated on 27 Sep 2023

Did you know?

Socket

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.

Install

Related posts