PHPackages                             nycorp/lang-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. nycorp/lang-helper

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

nycorp/lang-helper
==================

Simple, structured and intuitive language helper generator for Laravel projects.

1.0.2(1y ago)15[4 PRs](https://github.com/yann-yvan/lang-helper/pulls)MITPHPPHP ^8.0CI passing

Since Apr 26Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/yann-yvan/lang-helper)[ Packagist](https://packagist.org/packages/nycorp/lang-helper)[ Docs](https://github.com/nycorp/lang-helper)[ GitHub Sponsors](https://github.com/yann-yvan)[ RSS](/packages/nycorp-lang-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (8)Used By (0)

LangHelper Generator for Laravel
================================

[](#langhelper-generator-for-laravel)

[![Cover](cover.png)](cover.png)

---

[![Latest Version on Packagist](https://camo.githubusercontent.com/7d9e9774cf6a2c43db315b07e26989d0c16e0091059524976756ddceb7905de0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e79636f72702f6c616e672d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nycorp/lang-helper)[![Total Downloads](https://camo.githubusercontent.com/e67c35aa3b9e84802f5a0b331a3657219ded833a273d5c6b0bb7ed6b472b29d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e79636f72702f6c616e672d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nycorp/lang-helper)

Simple, structured and intuitive language helper generator for Laravel projects.

✨ Features
----------

[](#-features)

- 📁 **Group by folders**: Auto-organize translation keys into structured classes.
- 💡 **Intuitive access**: Access translations like `LangHelper::auth()->password()->reset()`.
- 🔄 **Nested keys support**: Full nested language file support.
- ❌ **No language selection required**: Automatically calls the default `__('auth.password.reset')` function.
- ✏️ **Detect unused lang file**: Easily find and clean unused translation entries.

---

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

[](#installation)

You can install the package via composer:

```
composer require --dev nycorp/lang-helper
```

---

⚙️ Usage
--------

[](#️-usage)

### 1. Generate LangHelper

[](#1-generate-langhelper)

```
php artisan lang:generate
```

This will create the `app/Helpers/LangHelper.php` and related group folders.

### 2. Detect Unused Translations

[](#2-detect-unused-translations)

```
php artisan lang:generate --detect-unused
```

This will list all unused translation methods.

### 3. Example Usage

[](#3-example-usage)

```
LangHelper::auth()->password()->reset();
LangHelper::validation()->email();
LangHelper::validation()->email($value);
```

non existing file will generate

```
LangHelper::navigation()->home();
// will return navigation.home
```

You can publish the config file with:

```
php artisan vendor:publish --tag="lang-helper-config"
```

This is the contents of the published config file:

```
return [
    'excluded_directories' => [
        'vendor'
    ],
    'excluded_lang_files' => [
        // auth
    ],
];
```

---

📊 Potential Updates
-------------------

[](#-potential-updates)

- Fail safety like \_\_()
- Verify usage on all key branch
- Auto-generate on file save (watch mode)
- Add support for parameter placeholders
- Blade components integration
- Make group namespaces configurable

---

🚀 Contributing
--------------

[](#-contributing)

We welcome contributions! ✨

- Fork this repository
- Create a feature branch (`git checkout -b feature/my-feature`)
- Commit your changes
- Push your branch (`git push origin feature/my-feature`)
- Open a pull request!

We recommend clean, readable code and simple commit messages.

---

🙏 Thanks
--------

[](#-thanks)

This project was initially developed during a real-world [Shortext](https://shortext.ny-corp.io) need to simplify multilingual management in Laravel apps.

Enjoy! 🚀

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Yann Yvan](https://github.com/yann-yvan)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

> Made with ❤️ for Laravel developers.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance73

Regular maintenance activity

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

3

Last Release

378d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d46eefacf6eb9db2a88486e899e9b9310b593b660860d96bbf777cf1780ab7eb?d=identicon)[Yann-Yvan](/maintainers/Yann-Yvan)

---

Top Contributors

[![yann-yvan](https://avatars.githubusercontent.com/u/31866892?v=4)](https://github.com/yann-yvan "yann-yvan (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelNyCorplang-helper

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/nycorp-lang-helper/health.svg)

```
[![Health](https://phpackages.com/badges/nycorp-lang-helper/health.svg)](https://phpackages.com/packages/nycorp-lang-helper)
```

###  Alternatives

[askdkc/breezejp

Laravel Starter Kit (Livewire+Breeze+Laravel UI+Jetstream)や標準のバリデーションメッセージを全て一瞬で日本語化し、言語切替機能も提供するパッケージです / This package provides all-in-one Japanese translation for Laravel StarterKit (Livewire StarterKit, Breeze, Laravel UI and Jetstream) packages and validation messages with language switching feature.

590244.8k1](/packages/askdkc-breezejp)[statikbe/laravel-filament-chained-translation-manager

A translation manager tool for Laravel Filament, that makes use of the Laravel Chained Translator.

92108.7k](/packages/statikbe-laravel-filament-chained-translation-manager)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[elegantly/laravel-translator

All on one translations management for Laravel

6216.9k](/packages/elegantly-laravel-translator)[smousss/laravel-globalize

Make Laravel projects translatable in a matter of seconds!

2266.3k](/packages/smousss-laravel-globalize)[cosnavel/laravel-query-localization

Query String Localization Package for Laravel

508.2k](/packages/cosnavel-laravel-query-localization)

PHPackages © 2026

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