Laravel localization in Hindi हिन्दी

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

ISO 639-1

hi

Script / Direction

Devanagari · LTR

Plural forms (Laravel)

2

Text vs English

Similar

Locale codes

Set the base locale in config/app.php. For regional variants, Hindi commonly uses: hi_IN

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

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

Plural rules: what Hindi actually needs

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

CLDR category Numbers that select it
one 0–1
other 2–130, 200, 1000, 1000000, 1.5

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

Form index Numbers that select it
0 0–1
1 2–130, 200, 1000
// lang/hi/messages.php
'items' => ':count item|:count items'

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

Try any number live in the pluralization tester.

Localized dates with Carbon

Real output for Hindi (hi locale), generated by Carbon for March 21, 2026:

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

$date->translatedFormat('l, j F Y');
// "शनिवार, 21 मार्च 2026"

$date->isoFormat('LLLL');
// "शनिवार, 21 मार्च 2026, दोपहर 2:30 बजे"

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

$date->subDays(3)->diffForHumans();
// "3 महीने पहले"

What to watch out for in Hindi

Indian digit grouping is not thousands

This is the single most visible formatting difference and the one most often shipped wrong. Indian number formatting does not group digits in threes. It groups the last three, then in pairs thereafter, following the lakh and crore system rather than thousands and millions.

Value Western grouping Indian grouping Name
1000 1,000 1,000 one thousand
100000 100,000 1,00,000 one lakh
1000000 1,000,000 10,00,000 ten lakh
10000000 10,000,000 1,00,00,000 one crore

A price rendered as ₹1,000,000 rather than ₹10,00,000 is immediately readable as foreign software, and worse, it is genuinely harder for an Indian user to parse at a glance because the grouping does not align with the words they use for the magnitude.

Formatting with the Indian locale

<?php

$formatter = new NumberFormatter('hi_IN', NumberFormatter::DECIMAL);
echo $formatter->format(10000000);   // 1,00,00,000

// number_format() cannot do this — it only
// knows uniform three-digit grouping.
echo number_format(10000000);        // 10,000,000

PHP's number_format() cannot produce this grouping at all, since it assumes a uniform separator interval. Use NumberFormatter with the locale, or Laravel's Number helper with the locale set, rather than formatting manually.

Amounts are also commonly written in the units themselves — ₹5 लाख rather than ₹500,000 — in marketing and summary contexts. That is a copy decision rather than a formatting one, but it means currency fields need room for a suffix as well as digits.

Devanagari, matras and vertical space

Hindi is written in Devanagari, an abugida rather than an alphabet: each consonant carries an inherent vowel, and other vowels are written as marks (matras) attached above, below, before or after the consonant. Characters combine into clusters, and a horizontal line runs across the top of the word joining them.

The practical consequence is vertical. Marks sit above and below the base line, so Devanagari needs noticeably more line height than Latin text at the same font size. A line height tuned for English will clip the upper matras, and the clipping looks like a rendering glitch rather than a layout bug, so it tends to be dismissed.

Character-level string manipulation is unsafe. A visible syllable may be several code points — a consonant, a virama joining it to another consonant, and a vowel mark — so slicing at a fixed character count can split a cluster and produce a sequence that renders as something else entirely. Truncate on word boundaries or let CSS handle overflow.

Hindi has no uppercase and lowercase, which removes an entire class of case-transformation bugs. It also means any design relying on capitalisation for hierarchy does not translate, and text-transform rules should be scoped so they do not apply to Devanagari.

Both Devanagari digits (०१२३४५६७८९) and Western digits are used. Western digits are far more common in software and commerce, and CLDR defaults to them for hi, but Devanagari digits appear in formal and literary contexts. Pass the full locale so the choice is made by the locale data rather than by chance.

Verbs agree with the gender of the person you address

Hindi has two grammatical genders, and verbs agree with the gender of their subject. When the subject is the user, the sentence commits to a gender — as in Hebrew, there is no neutral way to say "you saved" or "you have been logged out".

English To a man To a woman
You saved आपने सहेजा आपने सहेजा
You are logged in आप लॉग इन हैं आप लॉग इन हैं
Welcome आपका स्वागत है आपका स्वागत है
You went आप गए आप गईं

The agreement surfaces in intransitive past-tense constructions and in adjectives describing the user, which in practice means a subset of interface strings rather than all of them. Hindi interface copy sidesteps it the same way Hebrew does: by preferring noun phrases and impersonal constructions over direct second-person address.

Nouns carry gender too, and adjectives agree with them, so the usual rule against assembling sentences from fragments applies. Hindi also uses postpositions rather than prepositions — the marker follows the noun — which means a template placing a word before a placeholder is structurally wrong before gender even enters into it.

Three levels of formality, and the one to use

Hindi distinguishes three degrees of address, and the choice affects pronouns and verb forms throughout the sentence.

Pronoun Register Used for
आप (aap) Respectful Standard for all software
तुम (tum) Familiar Friends, peers, informal apps
तू (tu) Intimate or rude Never in software

आप is the correct default for essentially every product. It is respectful without being stiff, and it is what Indian users expect from an interface. तुम reads as presumptuous from a company, and तू is either intimate or insulting depending on context — neither is appropriate for software.

A separate consideration is how much English to keep. Educated urban Hindi speakers use a great deal of English technical vocabulary, and fully translating terms such as file, login, download or settings into Sanskritised Hindi produces copy that reads as officialese and is often less clear than the borrowed word.

Most successful Hindi interfaces use borrowed English terms written in Devanagari — फ़ाइल for file, डाउनलोड for download — rather than either pure English or invented Hindi equivalents. Give translators a glossary settling which terms are borrowed, because the decision otherwise gets made afresh by whoever is working that week and the interface drifts.

Plurals, dates and input

Hindi uses two CLDR plural categories, so trans_choice() takes a two-part string. There is a wrinkle worth knowing: Hindi groups zero with one rather than with the plural, so 0 takes the singular form as it does in French.

Zero takes the singular in Hindi

// lang/hi/messages.php
'files' => ':count फ़ाइल|:count फ़ाइलें',

// 0 -> 0 फ़ाइल    (singular)
// 1 -> 1 फ़ाइल    (singular)
// 5 -> 5 फ़ाइलें  (plural)

This is handled correctly by Laravel with the locale set, and incorrectly by any hand-rolled $count === 1 check. Plural noun formation itself is gender-dependent and irregular, so both forms must be supplied rather than derived.

Hindi convention
Digits Western (Devanagari in formal use)
Grouping 1,00,00,000 (lakh/crore)
Decimal 1234.56
Currency ₹1,00,000
Short date 21/03/2026
First day of week Sunday

Decimal separators follow the English convention, so there is no decimal-comma hazard. Dates are day-first. The week starts on Sunday, which matters for calendar components.

Text entry commonly uses transliteration: users type Hindi phonetically in Latin characters and an input method converts it to Devanagari. As with CJK input methods, JavaScript reacting to every keystroke will fire on uncommitted intermediate text, so live search and validation should respect compositionstart and compositionend.

India is a market of many languages, not one

Hindi is the most widely spoken language in India, but it is a first language for well under half the population and is not spoken at all in much of the south and north-east. Treating a Hindi locale as covering India is a product assumption worth examining before it becomes a support burden.

English occupies an unusual position. It is an associate official language, it dominates business, technology and higher education, and a large share of the users most likely to pay for software prefer it outright. Many users read Hindi comfortably and still choose an English interface because the technical vocabulary is more familiar to them there.

The practical consequence is that Hindi should be offered rather than imposed. Do not infer the locale from an Indian IP address; expose an explicit language switcher, keep English available at all times, and store the choice against the account. Silently switching a user to Hindi is a common complaint about products entering the market.

Code-mixing is also the norm rather than the exception. Everyday spoken and written Hindi in urban India blends English words freely, and copy that rigorously avoids English reads as formal government language rather than as natural. This is the same glossary decision described above, and it is the single biggest determinant of whether Hindi copy sounds native.

If the market matters commercially, other Indian languages will follow — Bengali, Tamil, Telugu, Marathi and others each have very large speaker bases, and several use their own scripts with their own shaping and line-height requirements. Building the locale infrastructure to handle more than one Indic script from the start is considerably cheaper than retrofitting it for the second.

What ships broken most often

India is a multilingual market, and Hindi is not universal within it — a substantial share of users prefer English or one of the other scheduled languages. Offer Hindi as an explicit choice rather than inferring it from location, and keep English available alongside rather than treating the Hindi locale as a replacement.

Install the Laravel-Lang Hindi files for framework strings rather than translating validation messages yourself. They already use the respectful register consistently and handle the gender agreement that appears in several rules, which is easy to get subtly wrong across a few hundred messages.

Two checks are worth automating. Assert that number formatting goes through the locale-aware formatter rather than number_format(), since the digit-grouping error is both the most visible defect and the easiest to reintroduce. And render Devanagari strings at your production line height in a visual test, because clipped matras are dismissed as a font problem by anyone who does not read the script.

Framework strings already translated

Laravel's own validation, auth and pagination strings are maintained in Hindi 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 hi
php artisan lang:update

Translate your app into Hindi today

Import your lang files, translate every key into Hindi 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