Simple database implementation of Laravel Translations
4lexvav/laravel-db-translations is a Laravel package for simple database implementation of laravel translations.
It currently has 0 GitHub stars and 18 downloads on Packagist (latest version v0.1.2).
Install it with composer require 4lexvav/laravel-db-translations.
Discover more Laravel packages by 4lexvav
or browse all Laravel packages to compare alternatives.
Last updated
This package provides simple database implementation of Laravel' Loader interface used for translations and a few helper methods that can be exploit to use translations stored in your DB.
require 4lexvav/laravel-db-translations
Run migrations to create db_translations table:
php artisan vendor:publish --provider="Vav\Translation\DBTranslationServiceProvider" --tag=migrations
php artisan migrate
Populate your db_translations table with records, so that you can use the helper functions below
to display translations.
__db('some.key', ['Placeholder' => 'value'])
trans_db('some.key', ['Placeholder' => 'value'])
trans_choice_db('some.key', count($array), ['Placeholder' => 'value'])