PHPackages                             awema-pl/module-localization-helper - 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. awema-pl/module-localization-helper

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

awema-pl/module-localization-helper
===================================

Package for convenient work with Laravel's localization features

v1.0.6(4y ago)05015MITPHP

Since Oct 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/awema-pl/module-localization-helper)[ Packagist](https://packagist.org/packages/awema-pl/module-localization-helper)[ Docs](https://github.com/awema-pl/module-localization-helper)[ RSS](/packages/awema-pl-module-localization-helper/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (8)Used By (15)

LocalizationHelper
==================

[](#localizationhelper)

[![Coverage report](https://camo.githubusercontent.com/1fb1748d31dfeded804b1006662bbcccbf201076c5e20254f16f7b9c88f49ac8/68747470733a2f2f7265706f2e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d6c6f63616c697a6174696f6e2d68656c7065722f6261646765732f6d61737465722f636f7665726167652e737667)](https://www.awema.pl/)[![Build status](https://camo.githubusercontent.com/76f07bab60b3d33c29e1e4e25a04fb7d730323ced43c8d2b91fa8136a7d37e17/68747470733a2f2f7265706f2e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d6c6f63616c697a6174696f6e2d68656c7065722f6261646765732f6d61737465722f6275696c642e737667)](https://www.awema.pl/)[![Composer Ready](https://camo.githubusercontent.com/144a8aa8098b41573b580a0ac3c1f8475b7e03a1a53b40295b191f57b03edb6d/68747470733a2f2f7777772e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d6c6f63616c697a6174696f6e2d68656c7065722f7374617475732e737667)](https://www.awema.pl/)[![Downloads](https://camo.githubusercontent.com/eb5f011b9205bb675257be223216c5ad66c6e53dbd6472c587bec99fe35f5697/68747470733a2f2f7777772e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d6c6f63616c697a6174696f6e2d68656c7065722f646f776e6c6f6164732e737667)](https://www.awema.pl/)[![Last version](https://camo.githubusercontent.com/75c9a5856f7b256c63a0b957277fe2e4faabd29883585dbcfc730e8543169751/68747470733a2f2f7777772e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d6c6f63616c697a6174696f6e2d68656c7065722f76657273696f6e2e737667)](https://www.awema.pl/)

Package for convenient work with Laravel's localization features and fast language files generation. Take a look at [contributing.md](contributing.md) to see a to do list.

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

[](#installation)

Via Composer

```
$ composer require awema-pl/module-localization-helper
```

In Laravel 5.5+, service provider and facade will be automatically registered. For older versions, follow the steps below:

Register service provider in `config/app.php`:

```
'providers' => [
// [...]
        AwemaPL\LocalizationHelper\LocalizationHelperServiceProvider::class,
],
```

You may also register `LaravelLocalization` facade:

```
'aliases' => [
// [...]
        'LocalizationHelper' => AwemaPL\LocalizationHelper\Facades\LocalizationHelper::class,
],
```

Config
------

[](#config)

### Config Files

[](#config-files)

In order to edit default configuration you may execute:

```
php artisan vendor:publish --provider="AwemaPL\LocalizationHelper\LocalizationHelperServiceProvider"

```

After that, `config/localizationhelper.php` will be created.

Usage
-----

[](#usage)

Package registers global helper function `_p($file_key, $default, $placeholders)`:

```
_p('auth.login', 'Login'); // "Login"
```

It will create new localization file `auth.php` (if it doesn't exist) and write second parameter as language string under `login` key:

```
return [
    "login" => "Login"
];
```

On second call with same file/key `_p('auth.login')`, localization string will be returned, file will remain untouched.

Placeholders are also supported:

```
_p(
    'mail.invitation',
    'You’re invited to join :company company workspace',
    ['company' => 'AwemaPL']
);
```

If key is returned, it means that string already exists in localization file and you are trying to add new one using its value as an array.

```
// in localization file.php
return [
    "test" => "Test string"
];

_p('file.test.new', 'Test string'); // will return "file.test.new"

_p('file.test_2.new', 'Test string'); // will return "Test string"

// and modify localization file:
return [
    "test" => "Test string",
    "test_2" => [
        "new" => "Test string"
    ]
];
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Galymzhan Begimov](https://github.com/begimov)
- [All Contributors](contributing.md)

License
-------

[](#license)

[MIT](http://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~72 days

Recently: every ~96 days

Total

7

Last Release

1661d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68942388?v=4)[Awema](/maintainers/awema-pl)[@awema-pl](https://github.com/awema-pl)

---

Top Contributors

[![nepras](https://avatars.githubusercontent.com/u/13780106?v=4)](https://github.com/nepras "nepras (3 commits)")[![awema-pl](https://avatars.githubusercontent.com/u/68942388?v=4)](https://github.com/awema-pl "awema-pl (1 commits)")

---

Tags

phplaravellocalizationlanguagetranslationlocale

### Embed Badge

![Health badge](/badges/awema-pl-module-localization-helper/health.svg)

```
[![Health](https://phpackages.com/badges/awema-pl-module-localization-helper/health.svg)](https://phpackages.com/packages/awema-pl-module-localization-helper)
```

###  Alternatives

[codezero/laravel-localized-routes

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

544664.5k4](/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.

29119.1k1](/packages/opgginc-codezero-laravel-localized-routes)[awes-io/localization-helper

Package for convenient work with Laravel's localization features

3527.1k4](/packages/awes-io-localization-helper)[codezero/laravel-localizer

Automatically detect and set an app locale that matches your visitor's preference.

50404.9k4](/packages/codezero-laravel-localizer)[niels-numbers/laravel-localizer

Detects the user’s preferred language and redirects to the matching localized URL.

183.4k](/packages/niels-numbers-laravel-localizer)[longman/laravel-multilang

Package to integrate multi language (multi locale) functionality in Laravel 5.x

5514.6k1](/packages/longman-laravel-multilang)

PHPackages © 2026

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