bestboysmedialab/language-list
最新稳定版本:1.1.4
Composer 安装命令:
composer require bestboysmedialab/language-list
包简介
List of all languages with names and ISO 3166-1 codes in all languages and data formats for Laravel 5
README 文档
README
Language List is a package for Laravel 5 which lists all langauges with names and ISO 3166-1 codes in all languages and data formats.
Installation
Add bestboysmedialab/language-list to composer.json.
"bestboysmedialab/language-list": "1.1.3"
Run composer update to pull down the latest version of Country List.
Now open up app/config/app.php and add the service provider to your providers array.
'providers' => array(
'Bestboysmedialab\LanguageList\LanguageListServiceProvider',
)
Now add the alias.
'aliases' => array(
'Languages' => 'Bestboysmedialab\LanguageList\LanguageListFacade',
)
Usage
- Locale (en, en_US, fr, fr_CA...)
- Format (csv, html, json, mysql.sql, php, postgresql.sql, sqlite.sql, txt, xml, yaml)
Get all languages
Route::get('/', function()
{
return Languages::getList('en', 'json');
});
Get one Language
Route::get('/', function()
{
return Languages::getOne('RU', 'en');
});
统计信息
- 总下载量: 25.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-08