PHPackages                             folklore/laravel-locale - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. folklore/laravel-locale

ActiveProject[Framework](/categories/framework)

folklore/laravel-locale
=======================

Localization package for Laravel 5

v8.0.6(4y ago)3726MITPHPPHP ^7.3|^8.0.2

Since Sep 11Pushed 11mo ago3 watchersCompare

[ Source](https://github.com/folkloreinc/laravel-locale)[ Packagist](https://packagist.org/packages/folklore/laravel-locale)[ RSS](/packages/folklore-laravel-locale/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (28)Used By (0)

Laravel Locale
==============

[](#laravel-locale)

A simple localization package for Laravel 5. It provides URL detection, Route parameters, session storage, and view sharing.

[![Latest Stable Version](https://camo.githubusercontent.com/3759727190982228360328fb5659eee93c2aa354d4b902f7e844587776aa369a/68747470733a2f2f706f7365722e707567782e6f72672f666f6c6b6c6f72652f6c61726176656c2d6c6f63616c652f762f737461626c652e737667)](https://packagist.org/packages/folklore/laravel-locale)[![Build Status](https://camo.githubusercontent.com/ad1bbb0122c156b7bfc1a208ff21b83e45c0addc6813c3b9349dde6f86f3f2c1/68747470733a2f2f7472617669732d63692e6f72672f466f6c6b6c6f72656174656c6965722f6c61726176656c2d6c6f63616c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Folkloreatelier/laravel-locale)[![Coverage Status](https://camo.githubusercontent.com/ec0023fd64a08f484e661b6ea48371fa3a072b23d36259eeb88449091ac7e1e8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f466f6c6b6c6f72656174656c6965722f6c61726176656c2d6c6f63616c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Folkloreatelier/laravel-locale?branch=master)[![Total Downloads](https://camo.githubusercontent.com/c15b0fa4c6391cdc63a4b0f9c30228edb619a63539a3a3768939a202f2caca67/68747470733a2f2f706f7365722e707567782e6f72672f666f6c6b6c6f72652f6c61726176656c2d6c6f63616c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/folklore/laravel-locale)

Installation
------------

[](#installation)

#### Dependencies:

[](#dependencies)

##### Version prior to 3.0

[](#version-prior-to-30)

- [Laravel &lt;= 5.7](https://github.com/laravel/laravel)

##### Version 3.0 and up

[](#version-30-and-up)

- [Laravel &gt;= 5.5](https://github.com/laravel/laravel)

#### Installation:

[](#installation-1)

**1-** Require the package via Composer in your `composer.json`.

```
{
	"require": {
		"folklore/laravel-locale": "~3.0"
	}
}
```

**2-** Run Composer to install or update the new requirement.

```
$ composer install
```

or

```
$ composer update
```

**3-** Add the service provider to your `app/config/app.php` file

```
\Folklore\LaravelLocale\LocaleServiceProvider::class,
```

**5-** Publish the configuration file

```
$ php artisan vendor:publish --provider="Folklore\LaravelLocale\LocaleServiceProvider"
```

**6-** Review the configuration file

```
config/locale.php

```

Usage
-----

[](#usage)

### Define route locale

[](#define-route-locale)

You can specify the locale of a specific routes:

```
Route::get('/fr', [
  'as' => 'home.fr',
  'locale' => 'fr',
  function()
  {
    return view('home');
  }
]);
```

### Auto-detection from URL

[](#auto-detection-from-url)

It is possible to let the package auto-detect the locale from the first part fo the URL.

```
Route::get('/fr/a-propos', [
  'as' => 'about.fr',
  function()
  {
    return view('home');
  }
]);
```

Be sure to add the supported locales in `config/locale.php`

### View sharing

[](#view-sharing)

By default, this package shares two variables to every views `$locale` and `$otherLocales`. The `$otherLocales` variable is an array containing all the other locales than the current one.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~141 days

Recently: every ~296 days

Total

26

Last Release

356d ago

Major Versions

v1.0.0 → v2.0.02016-01-05

v2.2.5 → v3.0.02019-06-11

v3.0.2 → v8.0.02021-06-25

PHP version history (4 changes)v1.0.0PHP &gt;=5.5.9

v3.0.0PHP &gt;=7.0.0

v8.0.0PHP ^7.3|^8.0

v8.0.2PHP ^7.3|^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2ebcf321e0a9769d76c84a73b61c42f78fc04dca244ba44aa44dd715e741e28?d=identicon)[dmongeau](/maintainers/dmongeau)

---

Top Contributors

[![dmongeau](https://avatars.githubusercontent.com/u/124966?v=4)](https://github.com/dmongeau "dmongeau (29 commits)")

---

Tags

laravel-localizationframeworklaravellocalizationtranslationlocale

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/folklore-laravel-locale/health.svg)

```
[![Health](https://phpackages.com/badges/folklore-laravel-locale/health.svg)](https://phpackages.com/packages/folklore-laravel-locale)
```

###  Alternatives

[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[laravel-lang/common

Easily connect the necessary language packs to the application

1463.1M22](/packages/laravel-lang-common)[rebing/graphql-laravel

Laravel wrapper for PHP GraphQL

2.2k7.1M26](/packages/rebing-graphql-laravel)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

2770.1k1](/packages/opgginc-codezero-laravel-localized-routes)[lanin/laravel-api-exceptions

All in one solution for exception for JSON REST APIs on Laravel and Lumen.

40102.4k](/packages/lanin-laravel-api-exceptions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
