定制 rinvex/language 二次开发

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

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

rinvex/language

最新稳定版本:v2.0.2

Composer 安装命令:

composer require rinvex/language

包简介

Rinvex Language is a simple and lightweight package for retrieving language details with flexibility. A whole bunch of data including name, native, iso codes, language family, language script, language cultures, and other attributes for the 180+ known languages worldwide at your fingertips.

README 文档

README

Rinvex Language is a simple and lightweight package for retrieving language details with flexibility. A whole bunch of data including name, native, iso codes, language family, language script, language cultures, and other attributes for the 180+ known languages worldwide at your fingertips.

⚠️ This package is renamed and now maintained at rinvex/languages, author suggests using the new package instead.

Packagist Scrutinizer Code Quality Code Climate Travis StyleCI License

Usage

Install via composer require rinvex/language, then use intuitively:

// Get single language
$english = language('en');

// Get language name: English
echo $english->getName();

// Get language native name: English
echo $english->getNativeName();

// Get language ISO 639-1 code: en
echo $english->getIso6391();

// Get language ISO 639-2 code: eng
echo $english->getIso6392();

// Get language ISO 639-3 code: eng
echo $english->getIso6393();

// Get language script details: {"name": "Latin","iso_15924": "Latn","iso_numeric": "215","direction": "ltr"}
echo $english->getScript();

// Get language script name: Latin
echo $english->getScriptName();

// Get language script ISO 15924 code: Latn
echo $english->getScriptIso15924();

// Get language script ISO numeric code: 215
echo $english->getScriptIsoNumeric();

// Get language script direction: ltr
echo $english->getScriptDirection();

// Get language family details: {"name": "Indo-European","iso_639_5": "ine","hierarchy": "ine"}
echo $english->getFamily();

// Get language family name: Indo-European
echo $english->getFamilyName();

// Get language family ISO 6395 code: ine
echo $english->getFamilyIso6395();

// Get language family hierarchy: ine
echo $english->getFamilyHierarchy();

// Get language scope: individual
echo $english->getScope();

// Get language type: living
echo $english->getType();

// Get language cultures: {"en-US": {"name": "English (United States)","native": "English (United States)"}, {...}}
echo $english->getCultures();

// Get language specific culture: {"name": "English (United States)","native": "English (United States)"}
echo $english->getCulture('en-US');


// Get all languages
$languages = languages();

// Get all language scripts
$language_scripts = language_scripts();

// Get all language families
$language_families = language_families();

// Get languages with where condition (language script: Latin)
$whereLanguages = \Rinvex\Language\LanguageLoader::where('script.name', 'Latin');

Notes:

  • Rinvex Language is framework-agnostic, so it's compatible with any PHP framework whatsoever without any dependencies at all, except for the PHP version itself ^7.1.3. Awesome, huh? 😃
  • Rinvex Language provides the global helpers for your convenience and for ease of use, but in fact it's just wrappers around the underlying LanguageLoader class, which you can utilize and use directly if you wish

Features Explained

  • Language data are all stored here: resources/languages.json.
  • name - language english name
  • native - language native name
  • iso_639_1 - two letter code ISO 639-1
  • iso_639_2 - three letter code ISO 639-2
  • iso_639_3 - three letter code ISO 639-3
  • script - language script details
    • name: language script name
    • iso_15924: language script ISO 15924 code
    • iso_numeric: language script ISO numeric code
    • direction: language script writing direction
  • family - language family details
    • name: language family name
    • iso_639_5: three-letter ISO 639-5 code
    • hierarchy: language family hierarchy
  • cultures - list of language cultures
    • key: four-letter language culture code (iso_639_1-iso_3166_1)
    • value: culture object
      • name: language culture name
      • native: language culture native name
  • scope - language scope (like individual or macrolanguage)
  • type - language type (like living or ancient)

Changelog

Refer to the Changelog for a full history of the project.

Support

The following support channels are available at your fingertips:

Contributing & Protocols

Thank you for considering contributing to this project! The contribution guide can be found in CONTRIBUTING.md.

Bug reports, feature requests, and pull requests are very welcome.

Security Vulnerabilities

If you discover a security vulnerability within this project, please send an e-mail to help@rinvex.com. All security vulnerabilities will be promptly addressed.

About Rinvex

Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.

License

This software is released under The MIT License (MIT).

(c) 2016-2018 Rinvex LLC, Some rights reserved.

rinvex/language 适用场景与选型建议

rinvex/language 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.62k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 01 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「locale」 「lightweight」 「language」 「Flexible」 「Simple」 「scripts」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 rinvex/language 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 rinvex/language 我们能提供哪些服务?
定制开发 / 二次开发

基于 rinvex/language 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

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