{"id":22772891,"url":"https://github.com/baguettephp/http-accept-language","last_synced_at":"2025-04-15T06:50:09.725Z","repository":{"id":19170063,"uuid":"22402255","full_name":"BaguettePHP/http-accept-language","owner":"BaguettePHP","description":"HTTP Accept-Language header parser","archived":false,"fork":false,"pushed_at":"2023-04-30T07:22:33.000Z","size":41,"stargazers_count":19,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T06:50:03.741Z","etag":null,"topics":["accept-language","http","php"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/zonuexe/http-accept-language","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"haojianzong/haojianzong.github.io","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaguettePHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2014-07-30T00:50:45.000Z","updated_at":"2024-10-10T11:55:12.000Z","dependencies_parsed_at":"2024-06-18T14:03:47.236Z","dependency_job_id":"934b0cfa-ad77-477f-bb51-ee29b4762442","html_url":"https://github.com/BaguettePHP/http-accept-language","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"bd39d7e62e8b7382d134c448f0f6a1f38deea009"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaguettePHP%2Fhttp-accept-language","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaguettePHP%2Fhttp-accept-language/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaguettePHP%2Fhttp-accept-language/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaguettePHP%2Fhttp-accept-language/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaguettePHP","download_url":"https://codeload.github.com/BaguettePHP/http-accept-language/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023708,"owners_count":21199958,"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":["accept-language","http","php"],"created_at":"2024-12-11T17:10:03.856Z","updated_at":"2025-04-15T06:50:09.710Z","avatar_url":"https://github.com/BaguettePHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"HTTP Accept-Language\n====================\n\n[![Package version](http://img.shields.io/packagist/v/zonuexe/http-accept-language.svg?style=flat)](https://packagist.org/packages/zonuexe/http-accept-language)\n[![Build Status](https://github.com/BaguettePHP/http-accept-language/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/BaguettePHP/http-accept-language/actions)\n[![Downloads this Month](https://img.shields.io/packagist/dm/zonuexe/http-accept-language.svg)](https://packagist.org/packages/zonuexe/http-accept-language)\n\n`Teto\\HTTP\\AcceptLanguage` is HTTP `Accept-Language` header parser based on PHP [`Locale`][Locale] module.\n\n[Locale]: https://www.php.net/Locale\n\n## Future scope\n\nThis package was designed ten years ago and is considered legacy due to its global dependencies. Over time I will provide a new package as part of the [Hakone] project.\n\n[Hakone]: https://github.com/hakonephp\n\nRequirements\n------------\n\n * PHP (7.2+)\n   * `ext/intl`\n\nInstallation\n------------\n\n```\ncomposer require zonuexe/http-accept-language\n```\n\nUsage\n-----\n\nsee `tests/public/greeting.php`.\n\nAPI\n---\n\n * `Teto\\HTTP\\AcceptLanguage::detect()`\n * `Teto\\HTTP\\AcceptLanguage::get()`\n * `Teto\\HTTP\\AcceptLanguage::getLanguages()`\n * `Teto\\HTTP\\AcceptLanguage::parse()`\n\nFeatures\n--------\n\n * Accepts `*`(wildcard) tag\n   * `*-Hant-*` → `{language: '*', script: 'Hant'}`\n   * `zh-*-TW` → `{language: 'zh', region: 'TW'}`\n\nReference\n---------\n\n * [RFC 9110 - HTTP Semantics #12.5.4. Accept-Language][rfc9110-accept-language]\n * [RFC 4647 - Matching of Language Tags][rfc4647]\n * [RFC 5646 - Tags for Identifying Languages][rfc5646]\n\n[rfc9110-accept-language]: https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language\n[rfc4647]: https://datatracker.ietf.org/doc/html/rfc4647\n[rfc5646]: https://datatracker.ietf.org/doc/html/rfc5646\n\nCopyright\n---------\n\n\u003e **HTTP Accept-Language header parser for PHP**\n\u003e\n\u003e Copyright (c) 2016 Baguette HQ / USAMI Kenta\n\u003e\n\u003e MIT License\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining\n\u003e a copy of this software and associated documentation files (the\n\u003e \"Software\"), to deal in the Software without restriction, including\n\u003e without limitation the rights to use, copy, modify, merge, publish,\n\u003e distribute, sublicense, and/or sell copies of the Software, and to\n\u003e permit persons to whom the Software is furnished to do so, subject to\n\u003e the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be\n\u003e included in all copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n\u003e EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\u003e MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n\u003e NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n\u003e LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n\u003e OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n\u003e WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaguettephp%2Fhttp-accept-language","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaguettephp%2Fhttp-accept-language","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaguettephp%2Fhttp-accept-language/lists"}