Download the PHP package bruno-fernandes/laravel-multi-language without Composer
On this page you can find all versions of the php package bruno-fernandes/laravel-multi-language. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bruno-fernandes/laravel-multi-language
More information about bruno-fernandes/laravel-multi-language
Files in bruno-fernandes/laravel-multi-language
Package laravel-multi-language
Short Description Simple approach to models multi-language support.
License MIT
Homepage https://github.com/bruno-fernandes/laravel-multi-language
Informations about the package laravel-multi-language
Laravel Multi-language
IMPORTANT: Under active development. Do not use in production, api might change.
Simple approach to eloquent models translation. There are other packages that provide translation functionality, this is a different approach with some trade-offs. Priority is simplicity.
// TODO: add example database schema here.
Key points:
- easy to get up running on existing applications
- all eloquent model fields are translatable
- original can be created in any language
- translations can be copied from original
- translations can be easily associated later on
Installation
You can install the package via composer:
If you want to set custom column names, publish the config file and override the defaults:
Usage
Known issues
-
When used with Searchable package global scopes need to be removed and applied manually after the search method is used.
- when using hasOne relationships, if foreign_key and local_key are not set the LangScope (Global Scope) is applied to the relationship, if the relationship model is not translatable an error is thrown.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Bruno Fernandes
- All Contributors
License
The MIT License (MIT). Please see License File for more information.