
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
all-iso-language-codes
Advanced tools
List of all iso 639-1, 639-2T, 639-2B, 639-3 codes with their translations in any language
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Sometimes you need to get a fresh list of 639-1, 639-2T, 639-2B or 639-3 language codes and their translations. Until now there was not an easy way to get them.
All data are available in json
format in data/[language]/639-1.json
. More formats might be available in the future.
Function | Arguments | Return value | Example usage |
---|---|---|---|
getEnglishName(code: string) | language code | string | null | getEnglishName('cs') => Czech |
getNativeName(code: string) | language code | string | null | getNativeName('cs') => čeština |
getName(code: string, language = 'en') | from language, to language? | string | null | getName('cs', 'en') => Czech |
isValid(code: string, availableIsoTypes?: IsoType[], moreInfo = false) | language code, IsoType (below table), moreInfo | boolean | { iso: IsoType | null; found: boolean; } | isValid('cs') => true , isValid('cs', ['639-1'], true) => { iso: '639-1'; found: true; } , |
getIsoCodesFromNativeName(nativeName: string, normalizeString = false) | language name, should normalize string (lowercase and remove diacritics) | IsoType[] | null | getIsoCodesFromNativeName('ČeŠtInA', true) => ['639-3', '639-2B', '639-2T', '639-1'] |
getAll639_1() | - | string[] (639-1 array) | getAll639_1() => ['aa', 'ab', 'af'...] |
getAll639_2B() | - | string[] (639-2B array) | getAll639_2B() => ['aar', 'abk', 'ace'...] |
getAll639_2T() | - | string[] (639-2T array) | getAll639_2T() => ['aar', 'abk', 'ace'...] |
getAll639_3() | - | string[] (639-3 array) | getAll639_3() => ['aaa', 'aab', 'aac'...] |
type IsoType = '639-1' | '639-2B' | '639-2T' | '639-3'
If you have some ideas (csv
, another JSON
format...) let me know or create PR.
Language matrix is generated by Node.js
Intl
API (version 23.10.0). If you would like to edit something, Create PR in Node.js
Intl
API. Wait until release and run yarn generate
.
There are jest
tests which tests basic functionality. Feel free to extend them or convert to vitest
.
Getting the list of all available languages is from official list
FAQs
List of all iso 639-1, 639-2T, 639-2B, 639-3 codes with their translations in any language
The npm package all-iso-language-codes receives a total of 873 weekly downloads. As such, all-iso-language-codes popularity was classified as not popular.
We found that all-iso-language-codes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.