{"id":22917002,"url":"https://github.com/koalex/countries-json","last_synced_at":"2025-05-12T17:05:45.755Z","repository":{"id":57209849,"uuid":"166657623","full_name":"koalex/countries-json","owner":"koalex","description":"List of all countries with names and ISO 3166-1 codes in all languages in JSON.","archived":false,"fork":false,"pushed_at":"2019-01-20T13:47:25.000Z","size":637,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T17:05:34.015Z","etag":null,"topics":["countries","iso3166-1","json","locales"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koalex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-20T12:18:01.000Z","updated_at":"2020-02-28T20:29:59.000Z","dependencies_parsed_at":"2022-08-29T14:11:46.746Z","dependency_job_id":null,"html_url":"https://github.com/koalex/countries-json","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koalex%2Fcountries-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koalex%2Fcountries-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koalex%2Fcountries-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koalex%2Fcountries-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koalex","download_url":"https://codeload.github.com/koalex/countries-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253784908,"owners_count":21963899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["countries","iso3166-1","json","locales"],"created_at":"2024-12-14T06:15:43.132Z","updated_at":"2025-05-12T17:05:45.699Z","avatar_url":"https://github.com/koalex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Countries JSON\n\nInstallation:\n\n```bash\nnpm install countries-json --save\n```\n\n\nUsage example:\n\n```javascript\nimport countriesData from 'countries-json'; // warning: files size with all locales ~3Mb\n\nfunction getLang () { // browser\n    if (navigator.languages !== undefined \u0026\u0026 navigator.languages.length) {\n        return navigator.languages[0];\n    } \n    return navigator.userLanguage || navigator.language || navigator.browserLanguage || navigator.systemLanguage;    \n}\n\nlet countries = countriesData[getLang()]\n\nconsole.log( countries );\n\n```\nor for single locale:\n\n```javascript\nfunction getLang () { // browser\n    if (navigator.languages !== undefined \u0026\u0026 navigator.languages.length) {\n        return navigator.languages[0];\n    } \n    return navigator.userLanguage || navigator.language || navigator.browserLanguage || navigator.systemLanguage;    \n}\n\nlet countries = require('countries-json/data/' + getLang()); // load countries only for single locale\n\nconsole.log( countries );\n\n```\n\nThis project using [SemVer](http://semver.org) for versioning. For the versions available, see the [tags on this repository](https://github.com/koalex/countries/tags). \n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoalex%2Fcountries-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoalex%2Fcountries-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoalex%2Fcountries-json/lists"}