Waavi / translation

Better translation management for Laravel
MIT License
359 stars 168 forks source link

Load command for DB -> files #52

Open gboor opened 8 years ago

gboor commented 8 years ago

I know there is a command to load the translation files in to the database, but is it possible to facilitate a way to do it the other way around? I.e.; generate language files from a database?

The scenario for this is that I currently have a web app with 2 environments; 1 for translators to test their stuff and 1 production. Ideally, I want to generate the files for production and not install the Waavi/translation package there at all, saving some overhead.

1dnmr commented 6 years ago

yes, missing point

1dnmr commented 6 years ago

Implementation, in case somebody need it as me.

`<?php

namespace App\Console\Commands;

use Illuminate\Console\Command; use Illuminate\Support\Facades\DB;

class ExportResourceCommand extends Command { /**

AnasSafi commented 6 years ago

@1dnmr Can you write full code and document how to use it please?

1dnmr commented 6 years ago

@AnasSafi all code is above. You need create new command: php artisan make:command and paste this code. Then use it like described above: trans:export {--group=} {--lang=} {--list} {--test}