PHPackages                             keypoint-solutions/laravel-localization-helpers - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. keypoint-solutions/laravel-localization-helpers

ActiveLibrary[Localization &amp; i18n](/categories/localization)

keypoint-solutions/laravel-localization-helpers
===============================================

An artisan command package and methods for easy translation management. Derived from potsky's repo, adding modern PHP &amp;Laravel support, updated MS translator support and other features

13.0.0(1mo ago)2207GPL-3.0+PHP

Since Oct 13Pushed 1mo agoCompare

[ Source](https://github.com/keypoint-solutions/laravel-localization-helpers)[ Packagist](https://packagist.org/packages/keypoint-solutions/laravel-localization-helpers)[ RSS](/packages/keypoint-solutions-laravel-localization-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (15)Used By (0)

Laravel Localization Helpers
============================

[](#laravel-localization-helpers)

[![Total Downloads](https://camo.githubusercontent.com/1c26c74c6e0124255f3c8743a9808fa9f2186bb1911ce2db1d7d9893663cdeb0/68747470733a2f2f706f7365722e707567782e6f72672f6b6579706f696e742d736f6c7574696f6e732f6c61726176656c2d6c6f63616c697a6174696f6e2d68656c706572732f646f776e6c6f6164732e737667)](https://packagist.org/packages/keypoint-solutions/laravel-localization-helpers)

This branch is the current dev branch
-------------------------------------

[](#this-branch-is-the-current-dev-branch)

LLH is a set of artisan commands to manage translations in your Laravel project. Key features :

- parse your code and generate lang files
- translate your sentences automatically, thanks to Microsoft Translator API
- configure output according to your code style

Table of contents
-----------------

[](#table-of-contents)

1. [Installation](#1-installation)
2. [Configuration](#2-configuration)
3. [Usage](#3-usage)
4. [Support](#4-support)
5. [Contribute](#5-contribute)

1. Installation
---------------

[](#1-installation)

- Choose your version according to the version compatibility matrix:

LaravelLumenPackage8.x - 12.x8.x - 12.xmain- Add the following line in the `require-dev` array of the `composer.json` file and replace the version if needed according to your Laravel version:

    ```
    "keypoint-solutions/laravel-localization-helpers" : "^7.2"
    ```
- Update your installation : `composer update`
- For Laravel, add the following line in the `providers` array of the `config/app.php` configuration file :

    ```
    \LaravelLocalizationHelpersServiceProvider::class,
    ```
- For Lumen, add the following lines in the `bootstrap/app.php` file :

    ```
    $app->register( \LaravelLocalizationHelpersServiceProvider::class );
    $app->configure('laravel-localization-helpers');
    ```
- Now execute `php artisan list` and you should view the new *localization* commands:

    ```
    ...
    localization
    localization:clear          Remove lang backup files
    localization:find           Display all files where the argument is used as a lemma
    localization:missing        Parse all translations in app directory and build all lang files
    ...

    ```

In Laravel, you can add the facade in the Aliases if you need to manage translations in your code :

```
'LocalizationHelpers' => Facade\LocalizationHelpers::class
```

2. Configuration
----------------

[](#2-configuration)

To configure your fresh installed package, please create a configuration file by executing :

```
php artisan vendor:publish
```

Then you can modify the configuration in file :

```
config/laravel-localization-helpers.php
```

Add new folders to search for, add your own lang methods or functions, ...

### Backup files

[](#backup-files)

You should not include backup lang files in GIT or other versioning systems.

In your `laravel` folder, add this in `.gitignore` file :

```
# Do not include backup lang files
resources/lang/*/[a-zA-Z]*20[0-9][0-9][0-1][0-9][0-3][0-9]_[0-2][0-9][0-5][0-9][0-5][0-9].php
```

3. Usage
--------

[](#3-usage)

### 3.1 Command `localization:missing`

[](#31-command-localizationmissing)

This command parses all your code and generates translations according to lang files in all `lang/XXX/` directories.

Use `php artisan help localization:missing` for more informations about options.

#### *Examples*

[](#examples)

##### Generate all lang files

[](#generate-all-lang-files)

```
php artisan localization:missing
```

##### Generate all lang files without prompt

[](#generate-all-lang-files-without-prompt)

```
php artisan localization:missing -n
```

##### Generate all lang files without backuping old files

[](#generate-all-lang-files-without-backuping-old-files)

```
php artisan localization:missing -b
```

##### Generate all lang files with automatic translations

[](#generate-all-lang-files-with-automatic-translations)

```
php artisan localization:missing -t
```

##### Generate all lang files without keeping obsolete lemmas

[](#generate-all-lang-files-without-keeping-obsolete-lemmas)

```
php artisan localization:missing -o
```

##### Generate all lang files without any comment for new found lemmas

[](#generate-all-lang-files-without-any-comment-for-new-found-lemmas)

```
php artisan localization:missing -c
```

##### Generate all lang files without header comment

[](#generate-all-lang-files-without-header-comment)

```
php artisan localization:missing -d
```

##### Generate all lang files and set new lemma values

[](#generate-all-lang-files-and-set-new-lemma-values)

3 commands below produce the same output:

```
php artisan localization:missing
php artisan localization:missing -l
php artisan localization:missing -l "TODO: %LEMMA"
```

You can customize the default generated values for unknown lemmas.

The following command let new values empty:

```
php artisan localization:missing -l ""
```

The following command prefixes all lemma values with "Please translate this : "

```
php artisan localization:missing -l "Please translate this : %LEMMA"
```

The following command set all lemma values to null to provide fallback translations to all missing values.

```
php artisan localization:missing -l null
```

The following command set all lemma values to "Please translate this !"

```
php artisan localization:missing -l 'Please translate this !'
```

##### Silent option for shell integration

[](#silent-option-for-shell-integration)

```
#!/bin/bash

php artisan localization:missing -s
if [ $? -eq 0 ]; then
echo "Nothing to do dude, GO for release"
else
echo "I will not release in production, lang files are not clean"
fi
```

##### Simulate all operations (do not write anything) with a dry run

[](#simulate-all-operations-do-not-write-anything-with-a-dry-run)

```
php artisan localization:missing -r
```

##### Open all must-edit files at the end of the process

[](#open-all-must-edit-files-at-the-end-of-the-process)

```
php artisan localization:missing -e
```

You can edit the editor path in your configuration file. By default, editor is *Sublime Text* on *Mac OS X* :

```
'editor_command_line' => '/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl'
```

For *PHPStorm* on *Mac OS X*:

```
'editor_command_line' => '/usr/local/bin/phpstorm'
```

### 3.2 Command `localization:find`

[](#32-command-localizationfind)

This command will search in all your code for the argument as a lemma.

Use `php artisan help localization:find` for more informations about options.

#### *Examples*

[](#examples-1)

##### Find regular lemma

[](#find-regular-lemma)

```
php artisan localization:find Search
```

##### Find regular lemma with verbose

[](#find-regular-lemma-with-verbose)

```
php artisan localization:find -v Search
```

##### Find regular lemma with short path displayed

[](#find-regular-lemma-with-short-path-displayed)

```
php artisan localization:find -s "Search me"
```

##### Find lemma with a regular expression

[](#find-lemma-with-a-regular-expression)

```
php artisan localization:find -s -r "@Search.*@"
php artisan localization:find -s -r "/.*me$/"
```

> PCRE functions are used

### 3.3 Command `localization:clear`

[](#33-command-localizationclear)

This command will remove all backup lang files.

Use `php artisan help localization:clear` for more informations about options.

#### *Examples*

[](#examples-2)

##### Remove all backups

[](#remove-all-backups)

```
php artisan localization:clear
```

##### Remove backups older than 7 days

[](#remove-backups-older-than-7-days)

```
php artisan localization:clear -d 7
```

4. Support
----------

[](#4-support)

Use the [github issue tool](https://github.com/keypoint-solutions/laravel-localization-helpers/issues) to open an issue or ask for something.

5. Contribute
-------------

[](#5-contribute)

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance89

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.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 ~104 days

Recently: every ~159 days

Total

13

Last Release

55d ago

Major Versions

3.0.1 → 4.0.02022-12-18

4.0.1 → 5.0.02023-10-20

5.0.0 → 6.0.02024-04-07

6.1.2 → 7.0.02024-06-20

7.2.0 → 13.0.02026-03-18

### Community

Maintainers

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

---

Top Contributors

[![potsky](https://avatars.githubusercontent.com/u/408237?v=4)](https://github.com/potsky "potsky (157 commits)")[![schniper](https://avatars.githubusercontent.com/u/533628?v=4)](https://github.com/schniper "schniper (18 commits)")[![limenet](https://avatars.githubusercontent.com/u/474329?v=4)](https://github.com/limenet "limenet (5 commits)")[![Liingon](https://avatars.githubusercontent.com/u/5780473?v=4)](https://github.com/Liingon "Liingon (4 commits)")[![adriandmitroca](https://avatars.githubusercontent.com/u/3842935?v=4)](https://github.com/adriandmitroca "adriandmitroca (2 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (1 commits)")[![RockKeeper](https://avatars.githubusercontent.com/u/8629442?v=4)](https://github.com/RockKeeper "RockKeeper (1 commits)")[![daverdalas](https://avatars.githubusercontent.com/u/5399813?v=4)](https://github.com/daverdalas "daverdalas (1 commits)")[![shulard](https://avatars.githubusercontent.com/u/482993?v=4)](https://github.com/shulard "shulard (1 commits)")[![waffle-iron](https://avatars.githubusercontent.com/u/6912981?v=4)](https://github.com/waffle-iron "waffle-iron (1 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/keypoint-solutions-laravel-localization-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/keypoint-solutions-laravel-localization-helpers/health.svg)](https://phpackages.com/packages/keypoint-solutions-laravel-localization-helpers)
```

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[mariuzzo/laravel-js-localization

Laravel Localization in JavaScript

6073.9M3](/packages/mariuzzo-laravel-js-localization)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[kerigard/laravel-lang-ru

Ru lang for Laravel

2116.8k](/packages/kerigard-laravel-lang-ru)[highsolutions/laravel-translation-manager

Manage Laravel Translations

1518.8k](/packages/highsolutions-laravel-translation-manager)

PHPackages © 2026

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