2017 © Pedro PelĂĄez
 

library l5-location

Package designed for the Laravel Framework

image

alleycarvalho/l5-location

Package designed for the Laravel Framework

  • Monday, April 16, 2018
  • by alleycarvalho
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel 5 Location

Introduction

The l5-location package allows for a dynamic translation in the Laravel framework, according to the available language definitions., (*1)

Installation

Via Composer

Execute the following command to get the latest version of the package:, (*2)

``` bash composer require alleycarvalho/l5-location, (*3)


### If the Laravel version **`>=`** 5.5 * ServiceProvider will be attached automatically. ### Other * Add service provider to the `'providers'` array in **`config/app.php`**: ``` php 'providers' => [ 
 AlleyCarvalho\Location\Providers\LocationServiceProvider::class, ];

Configuration

  1. Add middleware in app/Http/kernel.php:

``` php protected $middlewareGroups = [ 'web' => [ 
 \AlleyCarvalho\Location\Http\Middleware\Locale::class, ]; ];, (*4)


## Basic Usage > The translation can be dynamically changed using links referring to the available language in **`resources/lang/`**. 1. Example in **`resources/views/welcome.blade.php`**: ``` html <p>{{ trans('auth.failed') }}</p> <a href="/locale/pt-BR">PortuguĂȘs</a> <a href="/locale/en">InglĂȘs</a> <a href="/locale/fr">FrancĂȘs</a>

If the file package is not available in resources/lang/ or in the package used, the translation will be done according to the configuration of 'fallback_locale' in config/app.php, (*5)

The Versions

16/04 2018

dev-master

9999999-dev

Package designed for the Laravel Framework

  Sources   Download

MIT

by Alley M. Carvalho

16/04 2018

v1.0.0

1.0.0.0

Package designed for the Laravel Framework

  Sources   Download

MIT

by Alley M. Carvalho