Skip to content

lesleydesmet/view-localization

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel View Localization

This package makes it possible to serve specific views for various locales.

Installation

This package is build for Laravel framework based applications.

For Laravel 4.2+ please refer to version 1.0.

Laravel 5.x

Require this package with composer:

composer require kevindierkx/view-localization

Service provider

Open config/app.php and register the required service provider.

'providers' => [
    ...
    'Kevindierkx\ViewLocalization\ViewLocalizationServiceProvider'
]

Usage

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.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

View localization in Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%