mcamara/laravel-localization now supports using the view base path for your localization making this packages obsolete.
This package makes it possible to serve specific views for various locales.
This package is build for Laravel framework based applications.
For Laravel 4.2+ please refer to version 1.0.
Require this package with composer:
composer require kevindierkx/view-localization
Open config/app.php
and register the required service provider.
'providers' => [
...
'Kevindierkx\ViewLocalization\ViewLocalizationServiceProvider'
]
Localized views are stored in files within the resources/views
directory. Within this directory there should be a subdirectory for each language supported by the application.
Views that serve as a default should go in the default resources/views
directory.
/resources
/views
/nl
messages.blade.php
messages.blade.php
In the above example the nl
locale would get a custom view, the en
locale however would get the default messages.blade.php
in the resources/views
directory.
The MIT License (MIT). Please see License File for more information.