{"id":32252621,"url":"https://github.com/inventaire/wikidata-lang","last_synced_at":"2026-02-18T22:37:42.890Z","repository":{"id":58228646,"uuid":"49428941","full_name":"inventaire/wikidata-lang","owner":"inventaire","description":"A database of languages and their Wikidata id, Wikimedia language code, ISO 639-1, ISO 639-2, ISO 639-3, ISO 639-6 codes","archived":false,"fork":false,"pushed_at":"2025-10-03T08:04:51.000Z","size":1007,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-23T14:40:58.675Z","etag":null,"topics":["wikidata"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inventaire.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"liberapay":"Association_Inventaire"}},"created_at":"2016-01-11T13:44:10.000Z","updated_at":"2025-10-03T08:04:56.000Z","dependencies_parsed_at":"2024-06-19T16:05:16.340Z","dependency_job_id":"d3a2967b-b185-4316-9a88-738d55e87580","html_url":"https://github.com/inventaire/wikidata-lang","commit_stats":{"total_commits":66,"total_committers":1,"mean_commits":66.0,"dds":0.0,"last_synced_commit":"d92cff7c85760eef4cefac9ee466c473188448a6"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/inventaire/wikidata-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventaire%2Fwikidata-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventaire%2Fwikidata-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventaire%2Fwikidata-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventaire%2Fwikidata-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inventaire","download_url":"https://codeload.github.com/inventaire/wikidata-lang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inventaire%2Fwikidata-lang/sbom","scorecard":{"id":492155,"data":{"date":"2025-08-11","repo":{"name":"github.com/inventaire/wikidata-lang","commit":"34f24bf1e5b43f4e615f5500bf39410d522792e5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T19:27:40.853Z","repository_id":58228646,"created_at":"2025-08-19T19:27:40.853Z","updated_at":"2025-08-19T19:27:40.853Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29597318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T22:25:43.180Z","status":"ssl_error","status_checked_at":"2026-02-18T22:25:42.766Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wikidata"],"created_at":"2025-10-22T18:20:13.553Z","updated_at":"2026-02-18T22:37:42.882Z","avatar_url":"https://github.com/inventaire.png","language":"JavaScript","funding_links":["https://liberapay.com/Association_Inventaire"],"categories":[],"sub_categories":[],"readme":"# wikidata-lang\n\nA database of languages and their [wikidata](https://wikidata.org) id, Wikimedia language code, ISO 639-1, ISO 639-2, ISO 639-3, and ISO 639-6 codes.\nA database of languages and their [Wikidata](https://www.wikidata.org) id, [Wikimedia language code](https://www.wikidata.org/wiki/Property:P424), [ISO 639-1](https://www.wikidata.org/wiki/Property:P218), [ISO 639-2](https://www.wikidata.org/wiki/Property:P219), [ISO 639-3](https://www.wikidata.org/wiki/Property:P220), [ISO 639-6](https://www.wikidata.org/wiki/Property:P211) codes\n\nThis database is based on the result of a [SPARQL query executed on query.wikidata.org](https://github.com/inventaire/wikidata-lang/blob/master/scripts/languages_data.rq), so the data is as good as Wikidata is: in case of an error, please update Wikidata and request an update of this database in the [issues](https://github.com/inventaire/wikidata-lang/issues).\n\nFor each language, the data object looks like this:\n```js\n{\n  wd: 'Q8798', // https://wikidata.org/entity/Q8798\n  label: 'Ukrainian', // English label\n  native: 'українська мова', // P1705\n  wmCode: [ 'uk' ], // P424\n  iso6391: [ 'uk' ], // P218\n  iso6392: [ 'ukr' ], // P219\n  iso6393: [ 'ukr' ] // P220\n  // iso6396 value (P221) missing for Q8798\n}\n```\n\n[![NPM](https://nodei.co/npm/wikidata-lang.png?stars\u0026downloads\u0026downloadRank)](https://npmjs.com/package/wikidata-lang/)\n\n[Download stats](https://npm-stat.com/charts.html?package=wikidata-lang)\n\n## Summary\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Install](#install)\n- [How-To](#how-to)\n  - [Access full language data objects](#access-full-language-data-objects)\n  - [Convert between codes](#convert-between-codes)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n## Install\n\nFrom a terminal, in your project directory, run:\n```sh\nnpm install wikidata-lang\n```\n\n## How-To\n\n### Access full language data objects\nIn your JS code:\n```js\n// languages indexed by Wikidata id is the default\nconst languagesByWdId = require('wikidata-lang')\n\n// For indexes by other available codes, require the desired module:\nconst languagesByIso6391Code = require('wikidata-lang/indexes/by_iso_639_1_code')\nconst languagesByIso6392Code = require('wikidata-lang/indexes/by_iso_639_2_code')\nconst languagesByIso6393Code = require('wikidata-lang/indexes/by_iso_639_3_code')\nconst languagesByIso6396Code = require('wikidata-lang/indexes/by_iso_639_6_code')\nconst languagesByWmCode = require('wikidata-lang/indexes/by_wm_code')\n// Note that you can also use an index regrouping all of the above\nconst languagesByAnyCode = require('wikidata-lang/indexes/by_any_code')\n\n// The Wikidata id index returns single language data objects\nlanguagesByWdId.Q8798\n// =\u003e { \"code\": \"uk\", \"label\": \"Ukrainian\", \"native\": \"Українська\", \"wd\": \"Q8798\" }\n\n// while indexes by code always return arrays of language data objects\n// to account for edge cases where several Wikidata languages items share a common code.\nlanguagesByIso6391Code.uk[0]\n// =\u003e { \"code\": \"uk\", \"label\": \"Ukrainian\", \"native\": \"Українська\", \"wd\": \"Q8798\" }\n```\n\n### Convert between codes\nConversion mappings can be build from the language data objects described above, but you can also use the pre-built ones:\n```js\nconst wdIdByWmCode = require('wikidata-lang/mappings/wd_id_by_wm_code.json')\nwdIdByWmCode['zh-min-nan'] // =\u003e 'Q36495'\n\nconst wdIdByIso6391Code = require('wikidata-lang/mappings/wd_id_by_iso_639_1_code.json')\nwdIdByIso6391Code['cr'] // =\u003e 'Q33390'\n\nconst wdIdByIso6392Code = require('wikidata-lang/mappings/wd_id_by_iso_639_2_code.json')\nwdIdByIso6392Code['kzu'] // =\u003e 'Q6380723'\n\nconst wdIdByIso6393Code = require('wikidata-lang/mappings/wd_id_by_iso_639_3_code.json')\nwdIdByIso6393Code['acc'] // =\u003e 'Q16110361'\n\nconst wdIdByIso6396Code = require('wikidata-lang/mappings/wd_id_by_iso_639_6_code.json')\nwdIdByIso6396Code['jah'] // =\u003e 'Q2742661'\n\nconst wmCodeByWdId = require('wikidata-lang/mappings/wm_code_by_wd_id.json')\nwmCodeByWdId['Q32762'] // =\u003e 'fiu-vro'\n\n// This one seems useless, as ISO 639-1 seem to always be equivalent to their corresponding Wikimedia language code\nconst wmCodeByIso6391Code = require('wikidata-lang/mappings/wm_code_by_iso_639_1_code.json')\nwmCodeByIso6391Code['id'] // =\u003e 'id'\n\nconst wmCodeByIso6392Code = require('wikidata-lang/mappings/wm_code_by_iso_639_2_code.json')\nwmCodeByIso6391Code['zza'] // =\u003e 'diq'\n\nconst wmCodeByIso6393Code = require('wikidata-lang/mappings/wm_code_by_iso_639_3_code.json')\nwmCodeByIso6391Code['yue'] // =\u003e 'zh-yue'\n\nconst wmCodeByIso6396Code = require('wikidata-lang/mappings/wm_code_by_iso_639_6_code.json')\nwmCodeByIso6391Code['yyef'] // =\u003e 'zh-yue'\n\n// etc.\n```\nSee the [`mappings` folder](https://github.com/inventaire/wikidata-lang/tree/master/mappings) for a full list of available mappings.\n\n**NB**: When several values are available for a given key, no value is added to the mapping for that key. It is added instead to the `mappings/x_by_x.multiple_values.json` file.\nFor instance, in ISO 639-2, both `ell` and `gre` are mapped to `el` in ISO 639-1 (also true for Wikimedia language codes)\n\n## Examples\nSee [how we use it in Inventaire](https://github.com/inventaire/inventaire/search?q=wikidata-lang\u0026type=code)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finventaire%2Fwikidata-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finventaire%2Fwikidata-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finventaire%2Fwikidata-lang/lists"}