neoxia/laravel-database-localization

Use a database source instead of files for localization in Laravel
2,606 1
Install
composer require neoxia/laravel-database-localization
Latest Version:v1.1.2
PHP:>=5.5.9
License:MIT
Last Updated:Mar 24, 2021
Links: GitHub  ·  Packagist
Maintainer: thomasruiz

Latest Stable Version

Laravel Database Localization

This package allows the storage of Laravel translations in a database instead of files. It is not opinionated about how you store your data (any database, any schema) or how you edit this data. It only overwrite the default translation loading by using a Laravel model that can be specified in the configuration.

Installation

Require this package with composer using the following command:

composer require neoxia/laravel-database-localization

Go to config/app.php, remove the original service provider

Illuminate\Translation\TranslationServiceProvider::class,

And replace it by this one.

Neoxia\DatabaseLocalization\DatabaseTranslationServiceProvider::class,

Configuration

You can publish a default config file by runnning the artisan command php artisan vendor:publish.

Update the configuration with you model class name. This model has to implement the Neoxia\DatabaseLocalization\Translatable interface.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

404,034,618 608
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

384,821,166 4,658