mlocati/countrynames
最新稳定版本:1.0.0
Composer 安装命令:
composer require mlocati/countrynames
包简介
A PHP library to work with localized country names
README 文档
README
Features
- Understand a lot of languages (almost 150 - but some language may not be complete).
- Works with PHP 5.3+
- Requires the mb_string PHP extension (or any package that implements mb_strtolower for UTF-8)
Install
With composer
composer require mlocati/countrynames
Without composer
<?php require_once 'autoload.php';
Sample usage
use MLocati\CountryNames\CountryList; require_once 'autoload.php'; // Not required if you use composer $italianList = new CountryList('it'); $italianCountry = $italianList->getCountryByName('italia'); $englishList = new CountryList('en'); $englishCountry = $englishList->getCountryByCode($italianCountry->getCode()); echo $englishCountry->getCanonicalName(); // Dumps 'Italy'
统计信息
- 总下载量: 6.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-16