bestboysmedialab / language-list
List of all languages with names and ISO 3166-1 codes in all languages and data formats for Laravel 5
Installs: 23 356
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 2
Forks: 3
Open Issues: 0
Language:TSQL
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-11-15 20:42:09 UTC
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');
});