承接 supportpal/accept-language-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

supportpal/accept-language-parser

最新稳定版本:v0.2.1

Composer 安装命令:

composer require supportpal/accept-language-parser

包简介

An alternative to ext-intl's locale_accept_from_http function.

README 文档

README


A PHP port of npm:accept-language-parser and an equivalent to the ext-intl locale_accept_from_http function.

Build Status Total Downloads Latest Stable Version License

Install

composer require supportpal/accept-language-parser

Usage

Parse

Parses an ACCEPT_LANGUAGE header and returns all parsed locales.

$parser = new \SupportPal\AcceptLanguageParser\Parser($_SERVER['http_accept_language']); foreach ($parser->parse() as $component) { echo $component->code(); }

Pick

Parses an ACCEPT_LANGUAGE header and returns only locales which match those requested.

$parser = new \SupportPal\AcceptLanguageParser\Parser('en-GB;q=0.8'); foreach ($parser->pick(array('en')) as $component) { echo $component->code(); }

License

This package is licensed under the MIT License.

统计信息

  • 总下载量: 40.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固