定制 mibo/languages 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mibo/languages

最新稳定版本:1.0.0

Composer 安装命令:

composer require mibo/languages

包简介

PHP Library for ISO 639-2, ISO 639-1 language codes

README 文档

README

codecov

mibo/languages

The library provides a simple interface for a language entity and language provider, which retrieves a language by its ISO 639 alpha-2 code, alpha-3 code, alpha-3/B code.
If the provider does not find the language, it throws an exception.

The Language entity contains its name, ISO 639-1 alpha-2 code, 639-2 alpha-3 code (639-2/T), 639-2/B code, and the language's name.

The list of the available languages can be changed by the provider, because the library (ISO) provider allows the dev to insert his/her own array of languages.

$provider = new \MiBo\Languages\ISO\LanguageProvider($myLanguageList ?? []);

$lang = $provider->getByAlpha2('sk');

echo $lang->getName(); // Slovak
echo $lang->getAlpha2(); // sk
echo $lang->getAlpha3(); // slk
echo $lang->getAlpha3T(); // slk
echo $lang->getAlpha3B(); // slo

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-14