PHPackages                             yazeedobaid/laravel-lang - 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. [Framework](/categories/framework)
4. /
5. yazeedobaid/laravel-lang

ActiveLibrary[Framework](/categories/framework)

yazeedobaid/laravel-lang
========================

Modular Export of Laravel translations for Front-End and API usage.

0.1(7y ago)07MITPHP

Since Jun 17Pushed 7y agoCompare

[ Source](https://github.com/yazeedobaid/Laravel-Lang)[ Packagist](https://packagist.org/packages/yazeedobaid/laravel-lang)[ RSS](/packages/yazeedobaid-laravel-lang/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

 Laravel-Lang
==============

[](#----laravel-lang)

 [ ![License](https://camo.githubusercontent.com/0938ea5946c4d39dcfaa05757198e135703831e9da8f363d36f7528114bfdd50/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f79617a6565646f626169642f4c61726176656c2d4c616e672e737667) ](https://github.com/yazeedobaid/Laravel-Lang/blob/master/LICENSE) [ ![Downloads](https://camo.githubusercontent.com/2d43a8aa5a5e9706f3133085ce070338fcdef0c6531df952a6eda808c5f07d7a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f79617a6565646f626169642f4c61726176656c2d4c616e672e737667) ](https://github.com/yazeedobaid/Laravel-Lang/releases/tag/0.1) [ ![Downloads](https://camo.githubusercontent.com/aa40af9d858c01c85e0e7f1a200c74eb119b9cb2c251e53fe9d0e58e9e40c2de/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f79617a6565646f626169642f4c61726176656c2d4c616e672f746f74616c2e737667) ](https://github.com/yazeedobaid/Laravel-Lang/releases)

Modular Export of Laravel translations for Front-End and API usage.

This package is inspired from the the way how CMSs built on top of Laravel work and how they are structured into packages for large-scale applications. In these CMSs, each package has its own langdirectory.

Also, this package has an exclude array to exclude lang files from each lang directory in these modular packages. And finally, an event is emitted after export is done.

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

[](#installation)

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```
$ composer require yazeedobaid/laravel-lang
```

Assets Publishing
-----------------

[](#assets-publishing)

To publish the config file of the package use:

```
php artisan vendor:publish --provider=YazeedObaid\Lang\LaravelLangServiceProvider --tag=config
```

Usage
-----

[](#usage)

Add this route to your Front-End side or call it as an API.

Config File
-----------

[](#config-file)

The config file contains configurations for the route to use for the translations, a middlewares array for the route to be applied to it. An events channel, to specify the event channel.

The keys for the 'paths' and 'files\_to\_exclude' arrays must be the same, since these keys define each package name (alias). Feel free to select you prefered name.

### Example config file

[](#example-config-file)

Below is an example on the path of a package to get its translations with a excluded trans file in that package:

```
'paths' => [
        /**
         * For each package in your project you can define the relative path to that
         * package from your root app directory to the lang directory in that package
         * to use it in export to Vue. The default path to Laravel applications which
         * is /resources/lang is set by default to you
         * */

        /**
         * Default path is the resources/lang path.
         * */
        'default' => '/resources/lang',

        /**
         * Here you define a path for each package you want to export the
         * translations for.
         * */
        'my-package' => '/packages/myPckage/src/resources/lang'
    ],

    'files_to_exclude' => [
        /**
         * In each package you define above in the paths array you can exclude files
         * in that package and not to include them in export to Vue process. Use the
         * same key you use above to exclude files in each package. The below is an
         * example of excluding the auth file in default Laravel translations
         * location.
         * */

        /*'default' => [
            'auth'
        ]*/
    ]
```

A Note to be Mentioned
----------------------

[](#a-note-to-be-mentioned)

This package was inspired from [kg-bot/laravel-localization-to-vue](https://github.com/kg-bot/laravel-localization-to-vue).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2887d ago

### Community

Maintainers

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

---

Top Contributors

[![yazeedobaid](https://avatars.githubusercontent.com/u/26872001?v=4)](https://github.com/yazeedobaid "yazeedobaid (6 commits)")

---

Tags

frameworklaravelLaravel-langYazeed ObaidObaid

### Embed Badge

![Health badge](/badges/yazeedobaid-laravel-lang/health.svg)

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

###  Alternatives

[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[laravel-lang/common

Easily connect the necessary language packs to the application

1463.1M22](/packages/laravel-lang-common)[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27431.5k](/packages/rahulalam31-laravel-abuse-ip)

PHPackages © 2026

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