定制 sukohi/country-code 二次开发

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

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

sukohi/country-code

Composer 安装命令:

composer require sukohi/country-code

包简介

Country codes based on iso 3166-1 like country name, alpha-2 code, alpha-3 code or numeric code for PHP

README 文档

README

Country codes based on iso 3166-1 like country name, alpha-2 code, alpha-3 code or numeric code for PHP

Demo

Installation

Execute composer command.

composer require sukohi/country-code:1.*

Usage

$country_code = new \Sukohi\CountryCode\CountryCode();
$mode = 'alpha-2';  // or alpha-3, numeric (skippable)

// Array
$country_data = $country_code->getArray($mode);
print_r($country_data);

// Country Name
$key = 'US';
$mode = 'alpha-2';  // or alpha-3, numeric (skippable)
$locale = 'en';     // (skippable)
echo $country_code->countryName($key, $mode, $locale);  // United States

Contribution

If you can translate country names to your mother language, please add the names in assets/csv/country_codes.csv.
And I'm glad if you would create a pull request.
Thank you!

License

This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固