thiagocordeiro / laravel-translator

Search translation keys and insert into json to be translated
MIT License
84 stars 22 forks source link

php array as output format instead of json #19

Closed sabat24 closed 4 years ago

sabat24 commented 4 years ago

I wonder if is there any reason to use json format as output by your package instead of php array?

thiagocordeiro commented 4 years ago

In older Laravel versions array had a different behaviour for translations (I guess), anyway this lib is quite flexible to add different translation repositories, basically it requires a new implementation of Translator\Translator\TranslationRepository, and a small change to 'translation_repository' => CustomTranslationRepository::class on config.php and the new repository will be used.

Feel free to create a PR with this changes ;)

thiagocordeiro commented 4 years ago

@sabat24 please check the answer above to see if it fits your needs, if it's not the case please re-open the issue and we can move-on this discussion