Laravel localization in Arabic العربية

Everything you need to ship Arabic in a Laravel app: the right locale codes, the exact plural forms trans_choice() expects, real localized Carbon output and Arabic-script considerations. Every value on this page was generated by running ICU, CLDR and Carbon — not copied from another article.

ISO 639-1

ar

Script / Direction

Arabic · RTL

Plural forms (Laravel)

6

Text vs English

Contracts

Locale codes

Set the base locale in config/app.php. For regional variants, Arabic commonly uses: ar_SA, ar_EG, ar_AE, ar_MA, ar_DZ

// config/app.php
'locale' => 'ar',
'fallback_locale' => 'en',

// Or switch at runtime
App::setLocale('ar');

Plural rules: what Arabic actually needs

CLDR defines 6 cardinal categories for Arabic. The sample numbers below were computed by ICU for this exact locale:

CLDR category Numbers that select it
zero 0
one 1
two 2
few 3–10, 103–110
many 11–99, 111–130
other 100–102, 200, 1000, 1000000, 1.5

Laravel's trans_choice() maps numbers to 6 pipe-separated forms for this locale:

Form index Numbers that select it
0 0
1 1
2 2
3 3–10, 103–110
4 11–99, 111–130
5 100–102, 200, 1000
// lang/ar/messages.php
'items' => ':count item|:count items'

// Usage
trans_choice('messages.items', $count, ['count' => $count]);

This language uses 6 plural forms. Laravel's built-in trans_choice only resolves two, so for grammatically correct output use an ICU MessageFormat package or handle the extra forms explicitly against the CLDR categories above.

Try any number live in the pluralization tester.

Localized dates with Carbon

Real output for Arabic (ar locale), generated by Carbon for March 21, 2026:

$date = now()->locale('ar');

$date->translatedFormat('l, j F Y');
// "السبت, 21 مارس 2026"

$date->isoFormat('LLLL');
// "السبت 21 مارس 2026 14:30"

$date->isoFormat('L');
// "21/3/2026"

$date->subDays(3)->diffForHumans();
// "منذ 3 أشهر"

What to watch out for in Arabic

Framework strings already translated

Laravel's own validation, auth and pagination strings are maintained in Arabic by the open-source Laravel-Lang project (MIT). Install them, then manage your app's own strings live:

composer require laravel-lang/common --dev
php artisan lang:add ar
php artisan lang:update

Translate your app into Arabic today

Import your lang files, translate every key into Arabic with one AI click, and publish changes live — no deploy. Set up in 5 minutes.

We use cookies to improve your experience and analyze site traffic. Cookie Policy

Cookie Preferences

Essential

Required for the site to work

Analytics

Help us improve the site

Marketing

Personalized ads and content