lbreda / laravel-langdb
Language database for Laravel
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/lbreda/laravel-langdb
Requires
- php: ^8.0
- illuminate/console: ^8.0|^9.0
- illuminate/database: ^8.0|^9.0
- illuminate/support: ^8.0|^9.0
README
A package to add a language database in your Laravel application.
It contains a comprehensive list of languages and their ISO codes.
Installation
You can install the package via composer:
composer require lbreda/laravel-langdb
Then you have to migrate:
php artisan migrate
After migrating, you need to refresh the language database using the command
php artisan lbreda:refresh-lang-db
Usage
The application adds a new model to your application: LBreda\LaravelLangDb\Language.
The model is a standard Eloquent model. Its tables is pre-filled with a comprehensive dataset.
Each language has the following properties (some of them may be null):
code_639_1: ISO-639-1 language codecode_639_2t: ISO-639-2/T language codecode_639_2b: ISO-639-2/B language codecode_639_3: ISO-639-3 language codenative_name: Native language nametranslatable_name: A string you can pass to__()ortrans()to have the language name in your application language
Contribute
You can contribute via GitHub pull requests. Feel free to report bugs via GitHub.
Translations are VERY well accepted.