laravelarab/tarjama
Tarjama is a Laravel package from laravelarab for managing Arabic translations and localization files. It helps organize translation strings, streamline multilingual workflows, and keep Arabic language content consistent across your Laravel application.
composer require laravelarab/<package>:^1.8 (confirm the exact Composer name in the README). v1.8.0 is the first line explicitly advertising Laravel 8 compatibility, so pin ^1.8 if you are on Laravel 8.extra.laravel.providers; if config or translations are not loading, inspect config/app.php and run php artisan package:discover.php artisan vendor:publish --tag=<package>-configphp artisan vendor:publish --tag=<package>-langphp artisan vendor:publish --tag=<package>-views only if you need to override views.config/app.php ('locale' => 'ar') or per request with App::setLocale('ar').__('...')/@lang('...') resolves, the HTML uses dir="rtl" lang="ar", and published language files are being read from lang/ar.SetLocale middleware that reads the user preference or session value and calls App::setLocale($locale). Register it in the web middleware group so every request resolves the correct locale.__() or @lang() for strings, and set direction dynamically, e.g. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ app()->getLocale() === 'ar' ? 'rtl' : 'ltr' }}">. If the package exposes RTL/LTR Blade directives, prefer those to keep templates consistent.lang/ar/validation.php and lang/ar/attributes.php. Use localized attribute names so validation messages read naturally in Arabic.->locale('ar') and PHP’s NumberFormatter with an Arabic locale such as ar_EG./ar/..., /en/...) if the application supports multiple languages.$this->get('/ar')->assertSee(__('messages.welcome', [], 'ar')); and $this->assertSame('ar', app()->getLocale());.php artisan config:cache after changing default locale settings, and ensure published language files are deployed with the application.^7.3|^8.0, so confirm your PHP version.php artisan config:clear and then php artisan config:cache.'fallback_locale' => 'en' in config/app.php to avoid raw translation keys when an Arabic string is missing. Publish all language files rather than copying only one.dir="rtl".php artisan tinker to check app()->getLocale() and trans('...'), and inspect the published lang/ar path. Use vendor:publish --force only when you intend to overwrite customised language files.How can I help you explore Laravel packages today?