samedi 27 février 2016

Laravel string Localization in config files

I'm having problem using trans() function in config file, I feel it not supposed to be used that way. However I've no clue on what would be the most efficient way to translate string text in config files (files in /config folder).

Original code

<?php

return [
    'daily' => 'Daily'
];

When I try to implement trans() application crashes and laravel return white page without any error messages

<?php

return [
    'daily' => trans('app.daily_text')
];



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire