PHPackages                             bousbaadev/lang-publisher - 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. bousbaadev/lang-publisher

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

bousbaadev/lang-publisher
=========================

A Laravel package that publishes language folders and adds Arabic and French validation translations

v1.0.1(1y ago)28MITPHPPHP ^8.0|^8.1|^8.2

Since Mar 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zakigit1/LaravelValidation-package)[ Packagist](https://packagist.org/packages/bousbaadev/lang-publisher)[ RSS](/packages/bousbaadev-lang-publisher/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Lang Publisher
======================

[](#laravel-lang-publisher)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e29795d315da511780aff32f3bb5ad8d6b0790a127dfa0364c283c678f37412b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626f75736261616465762f6c616e672d7075626c69736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bousbaadev/lang-publisher)[![Total Downloads](https://camo.githubusercontent.com/56d97d26e98a5ba47ae3829aeecaa84ecf362898cd07bfecab446cf199a7e1af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f75736261616465762f6c616e672d7075626c69736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bousbaadev/lang-publisher)[![License](https://camo.githubusercontent.com/e371f964e9f2cd80ca9939209b3ddf8e18e07d336514ae70a671de16a0a2ea2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626f75736261616465762f6c616e672d7075626c69736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bousbaadev/lang-publisher)

A Laravel package that automatically publishes language folders and adds Arabic (ar) and French (fr) validation translations. Compatible with all Laravel versions including Laravel 10+ where the lang directory is at the root level.

Features
--------

[](#features)

- Automatically detects and adapts to your Laravel version's language folder structure
- Publishes language files if they haven't been published yet
- Adds Arabic (ar) and French (fr) validation translations
- Works with both resource-based (Laravel 9 and below) and root-based (Laravel 10+) language directories
- Includes translations for auth, validation, pagination, and passwords files
- Simple installation with zero configuration required

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Laravel 10.0 or higher

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

[](#installation)

You can install the package via composer:

```
composer require bousbaadev/lang-publisher
```

The package will automatically detect your Laravel version and publish the language files to the appropriate directory.

Usage
-----

[](#usage)

### Automatic Publishing

[](#automatic-publishing)

Language files are automatically published when the package is installed. No additional configuration is required.

### Manual Publishing

[](#manual-publishing)

If you need to manually publish or update the language files, you can use the following Artisan command:

```
php artisan lang:publish
```

To force overwrite existing language files:

```
php artisan lang:publish --force
```

Supported Languages
-------------------

[](#supported-languages)

Currently, the package supports the following languages:

- English (en)
- Arabic (ar)
- French (fr)

How It Works
------------

[](#how-it-works)

The package detects your Laravel version and publishes language files to the appropriate directory:

- For Laravel 10+: `lang/` directory at the root level
- For Laravel 9 and below: `resources/lang/` directory

It provides translations for the following files:

- validation.php
- auth.php
- pagination.php
- passwords.php

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

[](#contributing)

### Adding Support for Other Languages

[](#adding-support-for-other-languages)

We welcome contributions to add support for additional languages. Here's how you can contribute:

1. **Fork the Repository**

    - Visit the [GitHub repository](https://github.com/zakigit1/LaravelValidation-package)
    - Click the "Fork" button in the top-right corner
2. **Clone Your Fork**

    ```
    git clone https://github.com/YOUR_USERNAME/lang-publisher.git
    cd lang-publisher
    ```
3. **Add a New Language**

    - Create a new directory in the `lang` folder with the ISO language code (e.g., `lang/de/` for German)
    - Copy the structure from an existing language folder
    - Translate all files (validation.php, auth.php, pagination.php, passwords.php)
    - Ensure you maintain the same array keys as the English version
4. **Update the Service Provider**

    - Add your new language code to the `ensureLocaleExists` method calls in `LangPublisherServiceProvider.php`
5. **Test Your Changes**

    - Install the package in a Laravel project
    - Verify that your language files are correctly published
6. **Submit a Pull Request**

    - Push your changes to your fork
    - Submit a pull request to the main repository
    - Provide a clear description of your changes

### Translation Guidelines

[](#translation-guidelines)

- Maintain the same array structure and keys as the English version
- Ensure translations are grammatically correct and culturally appropriate
- Use proper character encoding for special characters
- Follow Laravel's translation conventions

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Mohammed Ilyes Zakaria Bousbaa](https://github.com/bousbaadev)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~0 days

Total

2

Last Release

421d ago

### Community

Maintainers

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

---

Top Contributors

[![zakigit1](https://avatars.githubusercontent.com/u/94136263?v=4)](https://github.com/zakigit1 "zakigit1 (9 commits)")

### Embed Badge

![Health badge](/badges/bousbaadev-lang-publisher/health.svg)

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

###  Alternatives

[barryvdh/laravel-translation-manager

Manage Laravel Translations

1.7k3.6M17](/packages/barryvdh-laravel-translation-manager)[vluzrmos/language-detector

Detect the language for your application using browser preferences, subdomains or route prefixes.

109554.8k3](/packages/vluzrmos-language-detector)[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)[amendozaaguiar/laraveles-spanish-for-jetstream

Archivos de traducción al español latinoamericano para Laravel con Jetstream (auth, pagination, passwords, validation + todas las cadenas de Jetstream).

1412.1k](/packages/amendozaaguiar-laraveles-spanish-for-jetstream)

PHPackages © 2026

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