Laravel Langman - a language files manager in your artisan console
Themsaid has created a very nice package for our Laravel community. Currently, Laravel Langman is the best trending project on Github's trending PHP projects.
Langman is a language files manager in your artisan console, it helps you search, update, add, and remove translation lines with ease. Taking care of a multilingual interface is not a headache anymore.
Installation
You'll need PHP 7.0+ to run this tool.
Begin by installing the package through Composer. Run the following command in your terminal:
$ composer require themsaid/laravel-langman
Once done, add the following in the providers array of config/app.php:
Themsaid\Langman\LangmanServiceProvider::class
This package has a single configuration option that points to the resources/lang directory, if only you need to change the path then publish the config file:
php artisan vendor:publish --provider="Themsaid\Langman\LangmanServiceProvider"
Usage
Showing lines of a translation file
php artisan langman:show users
You get:
'+---------+---------------+-------------+ | key | en | nl | +---------+---------------+-------------+ | name | name | naam | | job | job | baan | +---------+---------------+-------------+ php artisan langman:show users.name
Brings only the translation of the name key in all languages.
php artisan langman:show users.nam -c
Brings only the translation lines with keys matching the given key via close match, so searching for nam brings values f
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Packages Laravel 5 Laravel 5.1 Laravel 5.2 Intermediate