typidesign / laravel-artisan-translations by Samuel De Backer

An artisan command to update json translation files.
20,954
4
3
Package Data
Maintainer Username: Samuel De Backer
Maintainer Contact: sdebacker@gmail.com (Samuel De Backer)
Package Create Date: 2017-06-01
Package Last Update: 2024-02-05
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:20:34
Package Statistics
Total Downloads: 20,954
Monthly Downloads: 402
Daily Downloads: 12
Total Stars: 4
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Manage translations in json files.

StyleCI

This package gives you an artisan command to manage translations in Laravel 5.4+ json files.

Installation

You can install the package via composer:

composer require typidesign/laravel-artisan-translations

Now add the service provider in config/app.php file:

'providers' => [
    // ...
    Typidesign\Translations\ArtisanTranslationsServiceProvider::class,
];

Usage

Add translations from a single file

php artisan translations:add vendor/typicms/pages/src/resources/lang/fr.json

Every translations present in this file will be added to /resources/lang/fr.json.

Add translations from a directory

php artisan translations:add vendor/typicms/pages/src/resources/lang

Every translations found in this directory will be added to /resources/lang

Overwrite translations

By default, translation keys will not be overwritten. You can use the --force option to overwrite existing keys:

Remove translations

php artisan translations:remove vendor/typicms/pages/src/resources/lang[/lg.json]

Every translations found in this file/directory will be removed from /resources/lang

php artisan translations:add vendor/typicms/pages/src/resources/lang --force

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 samuel@typidesign.be instead of using the issue tracker.

Credits

About Typi Design

Typi Design is a webdesign agency based in Brussels, Belgium.

License

The MIT License (MIT). Please see License File for more information.