PHPackages                             windstep/laravel-translation - 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. windstep/laravel-translation

ActiveLibrary

windstep/laravel-translation
============================

A tool for managing all of your Laravel translations

v1.4.1(4y ago)011MITPHP

Since Sep 24Pushed 4y agoCompare

[ Source](https://github.com/windstep/laravel-translation)[ Packagist](https://packagist.org/packages/windstep/laravel-translation)[ RSS](/packages/windstep-laravel-translation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (41)Used By (0)

[![Laravel Translation](logo.png)](logo.png)

Translation management for your Laravel application.

[![Laravel Translation UI](translation.png)](translation.png)

[![Travis (.org) branch](https://camo.githubusercontent.com/d1d8dfeb38b3929ca66ed06b52e20c6963740418aeafbfac0eec2eac1b1acd6f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2f6d61737465722e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/d1d8dfeb38b3929ca66ed06b52e20c6963740418aeafbfac0eec2eac1b1acd6f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2f6d61737465722e7376673f7374796c653d666f722d7468652d6261646765)[![Scrutinizer](https://camo.githubusercontent.com/c7d8c4d9ff52de8d8f8c0b235b2b1eba7aeb9823075d751adef8bef2828e2d5e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/c7d8c4d9ff52de8d8f8c0b235b2b1eba7aeb9823075d751adef8bef2828e2d5e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666f722d7468652d6261646765)[![Scrutinizer Coverage](https://camo.githubusercontent.com/09eae90a201520c202a06fe916a7bbd7f284f1e546925a7849a608b09693d643/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/09eae90a201520c202a06fe916a7bbd7f284f1e546925a7849a608b09693d643/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666f722d7468652d6261646765)[![GitHub](https://camo.githubusercontent.com/37ae7967ff5a96cf491bfbfd1e18013f3a0e6b9e9333adea604372efdb482761/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/37ae7967ff5a96cf491bfbfd1e18013f3a0e6b9e9333adea604372efdb482761/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f656469786f6e2f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666f722d7468652d6261646765)

---

About Laravel Translation
-------------------------

[](#about-laravel-translation)

Laravel Translation is a package for Laravel 5 which allows you full control over your translations when using [Laravel's localization](https://laravel.com/docs/5.7/localization) functionality.

The package allows you to manage your translations using either the native file based translations, but also provides a database driver which is useful in multi-server setups.

It exposes a user interface allowing you to update existing and add new translations to your application.

Below are a full list of features:

- File and database drivers
- Database translation loader (automatically load translations from the database when Laravel's translation retrieval methods and the database driver)
- User interface to add new languages and add and update translations
- Artisan commands to manage your translations
- Scan your application for missing translations

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

[](#installation)

Install the package via Composer

`composer require joedixon/laravel-translation`

Publish configuration and assets

`php artisan vendor:publish --provider="JoeDixon\Translation\TranslationServiceProvider"`

The service provider is loaded automatically using [package discovery](https://laravel.com/docs/5.7/packages#package-discovery).

Usage
-----

[](#usage)

### Configuration

[](#configuration)

The package ships with a configuration file called `translation.php` which is published to the config directory during installation. Below is an outline of the settings.

```
driver [file|database]

```

Choose either `file` or `database`. File translations utilise Laravel's native file based translations and includes support for both `array` based and `json` based language files.

```
route_group_config.middleware [string|array]

```

Apply middleware to the routes which ship with the package. For example, you may which to use the `auth` middleware to ensure package user interface is only accessible to logged in users.

```
translation_methods [array]

```

Choose which of Laravel's translation methods to use when searching for missing translation keys.

```
scan_paths [array]

```

Choose which paths to use when searching for missing translations. Narrowing the search to specific directories will result in a performance increase when scanning for missing translations.

```
ui_url [string]

```

Choose the root URL where the package user interface can be accessed. All routes will be prefixed by this value.

e.g. setting this value to `languages` will result in URLs such as `translations/{language}/translations`

```
database.languages_table

```

Choose the name of the languages table when using the database driver.

```
database.translations_table

```

Choose the name of the translations table when using the database driver.

### Drivers

[](#drivers)

#### File

[](#file)

Utitlises Laravel's native php array and JSON based language files and exposes a user interface to manage the enclosed translations. Add and update languages and translations using either the user interface or the built-in [Artisan commands](https://laravel.com/docs/5.7/artisan).

#### Database

[](#database)

The database driver takes all of the functionality of Laravel's file based language files, but moves the storage to the database, utilising the connection configured for your Laravel application.

It also replaces the translation loader in the container so all of Laravel's translation retrieval methods (`__()`, `trans()`, `@lang()`, etc) will load the relevant strings from the database rather than the files without the need to change any code in your application. It's a like for like swap.

To utilise the database driver, make sure to update the database table names in the configuration file and run the migrations.

### User interface

[](#user-interface)

Navigate to  (update `languages` to match the `translation.ui_url` configuration setting) and use the interface to manage your translations.

First, click on the language you wish to edit. On the subsequent page, find the translation you want to edit and click on the pencil icon or on the text and make your edits. As soon as you remove focus from the input, your translation will be saved, indicated by the green check icon.

### Artisan Commands

[](#artisan-commands)

The package ships with a series of Artisan commands which assist with translation management.

```
translation:add-language

```

Add a new language to the application.

```
translation:add-translation-key

```

Add a new language key for the application.

```
translation:list-languages

```

List all of the available languages in the application.

```
translation:list-missing-translation-keys

```

List all of the translation keys in the app which don't have a corresponding translation.

```
translation:sync-translations

```

Synchronise translations between drivers. This is useful if you have an exisitng application using the native file based language files and wish to move to the database driver. Running this command will take all of the translations from the language files and insert them in to the database.

```
translation:sync-missing-translation-keys

```

This command will scan your project (using the paths supplied in the configuration file) and create all of the missing translation keys. This can be run for all languages or a single language.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 93.2% 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 ~80 days

Recently: every ~178 days

Total

17

Last Release

1502d ago

Major Versions

v0.3.0 → v1.0.02019-09-09

### Community

Maintainers

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

---

Top Contributors

[![joedixon](https://avatars.githubusercontent.com/u/3438564?v=4)](https://github.com/joedixon "joedixon (246 commits)")[![ahferriz](https://avatars.githubusercontent.com/u/22202570?v=4)](https://github.com/ahferriz "ahferriz (5 commits)")[![windstep](https://avatars.githubusercontent.com/u/51027899?v=4)](https://github.com/windstep "windstep (4 commits)")[![OzanKurt](https://avatars.githubusercontent.com/u/8682003?v=4)](https://github.com/OzanKurt "OzanKurt (2 commits)")[![zek](https://avatars.githubusercontent.com/u/3463291?v=4)](https://github.com/zek "zek (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![muarachmann](https://avatars.githubusercontent.com/u/16350814?v=4)](https://github.com/muarachmann "muarachmann (1 commits)")[![AhsanShabbir](https://avatars.githubusercontent.com/u/13930306?v=4)](https://github.com/AhsanShabbir "AhsanShabbir (1 commits)")[![bhattnishant](https://avatars.githubusercontent.com/u/1320931?v=4)](https://github.com/bhattnishant "bhattnishant (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/windstep-laravel-translation/health.svg)

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

PHPackages © 2026

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