PHPackages                             awes-io/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. awes-io/localization-helper

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

awes-io/localization-helper
===========================

Package for convenient work with Laravel's localization features

v1.1.1(6y ago)3527.1k24MITPHPCI failing

Since Jan 15Pushed 6y ago4 watchersCompare

[ Source](https://github.com/awes-io/localization-helper)[ Packagist](https://packagist.org/packages/awes-io/localization-helper)[ Docs](https://github.com/awes-io/localization-helper)[ RSS](/packages/awes-io-localization-helper/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (6)Used By (4)

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

[](#localizationhelper)

[![Coverage report](https://camo.githubusercontent.com/7035926833899841248ae1e7d03a77337ca1e1512fbccd97df1a5b8291fa6f02/68747470733a2f2f7265706f2e706b676b69742e636f6d2f344742574f2f617765732d696f2f6c6f63616c697a6174696f6e2d68656c7065722f6261646765732f6d61737465722f636f7665726167652e737667)](https://www.awes.io/)[![Build status](https://camo.githubusercontent.com/cf141a6a1f2afa1f3739cede7dfa796bea339820ea94ae373a61b584f17710bb/68747470733a2f2f7265706f2e706b676b69742e636f6d2f344742574f2f617765732d696f2f6c6f63616c697a6174696f6e2d68656c7065722f6261646765732f6d61737465722f6275696c642e737667)](https://www.awes.io/)[![Composer Ready](https://camo.githubusercontent.com/e3dc1d9be2506cbb2f01937d05acfb666756b26cdd01d135b100b543c43bf5cd/68747470733a2f2f7777772e706b676b69742e636f6d2f344742574f2f617765732d696f2f6c6f63616c697a6174696f6e2d68656c7065722f7374617475732e737667)](https://www.awes.io/)[![Downloads](https://camo.githubusercontent.com/ae9294f9a9fbe0a75b9083fef34bc003b1168edd885f24ee7000db79bd8103f2/68747470733a2f2f7777772e706b676b69742e636f6d2f344742574f2f617765732d696f2f6c6f63616c697a6174696f6e2d68656c7065722f646f776e6c6f6164732e737667)](https://www.awes.io/)[![Last version](https://camo.githubusercontent.com/d573f5c48348fa71d181422b4a50fd2435105723eeeb37be9f40d06863c380f5/68747470733a2f2f7777772e706b676b69742e636f6d2f344742574f2f617765732d696f2f6c6f63616c697a6174696f6e2d68656c7065722f76657273696f6e2e737667)](https://www.awes.io/)

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 awes-io/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' => [
// [...]
        AwesIO\LocalizationHelper\LocalizationHelperServiceProvider::class,
],
```

You may also register `LaravelLocalization` facade:

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

Config
------

[](#config)

### Config Files

[](#config-files)

In order to edit default configuration you may execute:

```
php artisan vendor:publish --provider="AwesIO\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' => 'Awesio']
);
```

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

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~53 days

Recently: every ~66 days

Total

6

Last Release

2403d ago

Major Versions

v0.0.2 → v1.0.02019-02-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/7932461f5d3d8775210ba7ff5487258ff23c274648a9936341112158aa487480?d=identicon)[Yevhen L.](/maintainers/Yevhen%20L.)

---

Top Contributors

[![begimov](https://avatars.githubusercontent.com/u/3600510?v=4)](https://github.com/begimov "begimov (7 commits)")[![AlexFN](https://avatars.githubusercontent.com/u/49072623?v=4)](https://github.com/AlexFN "AlexFN (3 commits)")[![JShantal](https://avatars.githubusercontent.com/u/9612943?v=4)](https://github.com/JShantal "JShantal (3 commits)")[![yevhenlisovenko](https://avatars.githubusercontent.com/u/11060056?v=4)](https://github.com/yevhenlisovenko "yevhenlisovenko (2 commits)")

---

Tags

languagelaravellocalelocalizationphptranslationphplaravellocalizationlanguagetranslationlocale

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/awes-io-localization-helper/health.svg)

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

###  Alternatives

[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)[codezero/laravel-localizer

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

50394.3k4](/packages/codezero-laravel-localizer)[longman/laravel-multilang

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

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

PHPackages © 2026

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