sadegh19b / laravel-persian-lang
Persian language files for Laravel
v12
2025-03-28 09:36 UTC
Requires
- illuminate/support: ^12.0
README
This package provides Persian language files for Laravel. Support Laravel 5 to 12.
Installation
Option 1: Via Composer (Recommended)
You can install the package via composer:
composer require sadegh19b/laravel-persian-lang
If you want to install specific version of laravel, you can use (also you can see branches for different versions):
composer require sadegh19b/laravel-persian-lang:^{laravel-version}.0
Option 2: Manual Installation
If you prefer not to use Composer, you can manually copy the language files:
- Download or clone this repository
- Copy the
fa
folder fromlang/
to your Laravel application'slang/
directory - The language files will be available in your application
Usage
1. Publishing Language Files
Run the following command to publish the language files:
php artisan vendor:publish --tag=persian-lang
This will copy the language files to lang/fa/
in your application. You can then modify them as needed.
2. Setting the Language
To use Persian as your application's language, set the locale in your config/app.php
file:
'locale' => 'fa',
Available Language Files
auth.php
- Authentication related translationspasswords.php
- Password reset related translationsvalidation.php
- Validation related translationsvalidation-attributes.php
- Validation attributes related translations (added by me)pagination.php
- Pagination related translations
Contributing
Please feel free to submit any issues or pull requests.
License
The MIT License (MIT). Please see License File for more information.