trickeyone/intl-subdivision
最新稳定版本:4.0.0
Composer 安装命令:
composer require trickeyone/intl-subdivision
包简介
A PHP Intl library to retrieve states for a given country.
README 文档
README
A companion component to Symfony's Intl Component. This component allows for easy retrieval of a country's states/provinces using the country's ISO 3166-1 alpha-2 code.
The Symfony Intl component is a replacement for the C intl extension. It is limited to only the "en" locale. If you want to have access to more locales you should install the intl PECL extension.
Usage:
// States/Provinces for the United States of America $subdivisionsForUS = \Symfony\Component\IntlSubdivision\IntlSubdivision::getStatesAndProvincesForCountry('US'); // States/Provinces for Canada $subdivisionsForCA = \Symfony\Component\IntlSubdivision\IntlSubdivision::getStatesAndProvincesForCountry('CA'); // States/Provinces for the United Arab Emirates $subdivisionsForAE = \Symfony\Component\IntlSubdivision\IntlSubdivision::getStatesAndProvincesForCountry('AE');
Requirements
- PHP 7+ or 8+
- Symfony Intl package 5.0+ or 6.0+
- older versions can still support 4.0+ but are not actively supported
Resources
统计信息
- 总下载量: 59.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-08