gummibeer / laravel-translation
A Laravel 5 package that implements the Symfony Po-Translation lib.
                                    Fund package maintenance!
                                                                            
                                                                                                                                        Gummibeer
                                                                                    
                                                                            
                                                                                                                                        SarahSibert
                                                                                    
                                                                            
                                                                                                                                        Issuehunt
                                                                                    
                                                                            
                                                                                                                                        forest.astrotomic.info
                                                                                    
                                                                
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 1
pkg:composer/gummibeer/laravel-translation
Requires
- php: >=5.5.0
 - illuminate/console: 5.*
 - illuminate/filesystem: 5.*
 - illuminate/support: 5.*
 - illuminate/view: 5.*
 - symfony/translation: 2.7.*
 
This package is not auto-updated.
Last update: 2022-02-01 12:53:20 UTC
README
This is a laravel wrapper for the Symfony PoTranslator. It comes with two global helper functions __() and _n().
Installation
composer.json "astrotomic/laravel-translation": "dev-master"
config/app.php
return [
    ...
    'providers' => [
        Astrotomic\Laravel\Translation\TranslatorServiceProvider::class,
    ],
    ...
    'aliases' => [
        'Trans' => Astrotomic\Laravel\Translation\Facades\TranslatorFacade::class,
    ],
    ...
];
console
composer update
artisan vendor:publish
Usage
To generate the po files you first have to compile all your views, PoEdit can't handle blade, to do this use the artisan command artisan view:compile. After this you can generate the po files and the proper header with artisan trans:po. To collect and translate all the strings use PoEdit.