{"id":21740533,"url":"https://github.com/writecrow/country_code_converter","last_synced_at":"2025-06-26T19:34:57.232Z","repository":{"id":46804749,"uuid":"99973306","full_name":"writecrow/country_code_converter","owner":"writecrow","description":"A simple converter to/from country names \u0026 2- or 3-digit codes","archived":false,"fork":false,"pushed_at":"2024-01-04T14:27:40.000Z","size":21,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-19T17:51:03.581Z","etag":null,"topics":["php-library"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/writecrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-08-10T23:40:55.000Z","updated_at":"2025-05-27T10:55:47.000Z","dependencies_parsed_at":"2025-04-13T03:40:50.323Z","dependency_job_id":"89329921-54f1-4ef7-b9fc-0d4a9b2625fb","html_url":"https://github.com/writecrow/country_code_converter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/writecrow/country_code_converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcountry_code_converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcountry_code_converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcountry_code_converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcountry_code_converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writecrow","download_url":"https://codeload.github.com/writecrow/country_code_converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcountry_code_converter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262132825,"owners_count":23264077,"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":["php-library"],"created_at":"2024-11-26T06:13:54.422Z","updated_at":"2025-06-26T19:34:57.191Z","avatar_url":"https://github.com/writecrow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Country Code Converter\n\n[![Circle CI](https://circleci.com/gh/writecrow/country_code_converter.svg?style=shield)](https://circleci.com/gh/writecrow/country_code_converter)\n\nA PHP library for converting ISO country codes to names and vice-versa.\n\nCountry data was last updated on August 10, 2017, from\n[https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements](https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements)\n\nThe library recognizes ISO 2-digit, 3-digit, and numeric codes.\n\n## Usage in an application\nThe included `/demo/index.php` file contains a generation form demo.\n\nMake your code aware of the CountryCodeConverter class via your favorite method\n(e.g., `use` or `require`)\n\nThen pass a country code or country name into the class:\n```php\necho CountryCodeConverter::convert('AL');\n// Will print 'Albania'\n\necho CountryCodeConverter::convert('ALB');\n// Will print 'Albania'\n\necho CountryCodeConverter::convert('008');\n// Will print 'Albania'\n\necho CountryCodeConverter::convert('Albania');\n// Will print 'AL'\n```\n\n### Explicitly requesting return format.\nIf you want a specific format returned, pass the desired format as a second\nparameter:\n\n```php\necho CountryCodeConverter::convert('Albania', 'name');\n// Will print 'Albania'\n\necho CountryCodeConverter::convert('Albania', 'two-digit');\n// Will print 'AL'\n\necho CountryCodeConverter::convert('Albania', 'three-digit');\n// Will print 'ALB'\n\necho CountryCodeConverter::convert('Albania', 'numeric');\n// Will print '008'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritecrow%2Fcountry_code_converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritecrow%2Fcountry_code_converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritecrow%2Fcountry_code_converter/lists"}