Laravel localization in Hungarian Magyar
Everything you need to ship Hungarian in a Laravel app: the right locale codes,
the exact plural forms trans_choice() expects,
real localized Carbon output and Latin-script considerations.
Every value on this page was generated by running ICU, CLDR and Carbon — not copied from another article.
ISO 639-1
hu
Script / Direction
Latin · LTR
Plural forms (Laravel)
2
Text vs English
Expands
Locale codes
Set the base locale in config/app.php. For regional variants,
Hungarian commonly uses:
hu_HU
// config/app.php
'locale' => 'hu',
'fallback_locale' => 'en',
// Or switch at runtime
App::setLocale('hu');
Plural rules: what Hungarian actually needs
CLDR defines 2 cardinal categories for Hungarian. The sample numbers below were computed by ICU for this exact locale:
| CLDR category | Numbers that select it |
|---|---|
| one | 1 |
| other | 0, 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 | 1 |
| 1 | 0, 2–130, 200, 1000 |
// lang/hu/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 Hungarian (hu locale),
generated by Carbon for March 21, 2026:
$date = now()->locale('hu');
$date->translatedFormat('l, j F Y');
// "szombat, 21 március 2026"
$date->isoFormat('LLLL');
// "2026. március 21., szombat 14:30"
$date->isoFormat('L');
// "2026.03.21."
$date->subDays(3)->diffForHumans();
// "3 hónapja"
What to watch out for in Hungarian
- Agglutinative with an extensive case-suffix system; suffixes attach to nouns, so raw placeholder concatenation breaks grammar.
- Vowel harmony determines which suffix variant attaches (e.g. -ban/-ben).
- Dates are written year-first with dots (2026. 03. 01.) and family name precedes given name.
- No grammatical gender (a single pronoun ő covers he/she); decimal comma with space as thousands separator.
Vowel harmony makes suffixes unpredictable
Hungarian is agglutinative: it expresses with suffixes what English expresses with prepositions and word order. Rather than in the file, Hungarian says fájlban — the noun with a case suffix attached. There are around eighteen such cases, and suffixes stack.
The complication is that the suffix is not fixed. Hungarian has vowel harmony: the vowels in the suffix must match the vowels in the stem, so the same grammatical case has two or three different written forms depending on the word it attaches to.
| Meaning | Back-vowel stem | Front-vowel stem |
|---|---|---|
| in the … | fájlban (in the file) | gépben (in the machine) |
| to the … | fájlnak | gépnek |
| with the … | fájllal | géppel |
| from the … | fájlból | gépből |
This is why placeholders holding nouns are fundamentally unsafe in Hungarian. Any sentence template that appends a suffix to a variable word will produce the wrong suffix for roughly half of the possible values, and the rule depends on the vowels of a word your code does not know in advance.
A template that cannot be made correct
// English: 'Saved in :folder'
// Hungarian needs the suffix to harmonise with
// the folder name's vowels:
//
// Dokumentumok -> Dokumentumokban (back)
// Képek -> Képekben (front)
//
// No template can choose between -ban and -ben.
The workable pattern is to quote the variable and attach the suffix to a fixed common noun instead: Mentve a „Képek” mappában — saved in the folder "Képek". The suffix now attaches to mappa (folder), which you control, and the variable sits in quotation marks in its base form.
Numbers take the singular
Hungarian has a plural, but it is not used after a number. Where English says three files, Hungarian says három fájl — three file, singular. The number already conveys plurality, so marking it again on the noun is ungrammatical.
One form, always singular
// lang/hu/messages.php
'files' => ':count fájl',
// 0 -> 0 fájl
// 1 -> 1 fájl
// 42 -> 42 fájl
//
// ':count fájlok' is wrong for every number.
CLDR gives Hungarian a single plural category for this reason, so trans_choice() takes one form and it applies universally. The mistake is not in the plural machinery but in the translation: a translator working from an English source with two forms may dutifully supply a plural noun for the second, producing text that is wrong every time it appears.
The plural suffix -k does exist and is used when no number is present — a fájlok (the files) — so both forms occur in an interface. The rule is specifically that a numeral suppresses it, and the same applies after words expressing quantity such as sok (many) or néhány (some), which also take a singular noun.
No gender, but definiteness changes the verb
Hungarian has no grammatical gender at all, and no gendered third-person pronoun: ő covers he, she and they. This removes an entire class of problems that plague German, Spanish and French translations, and it makes gender-neutral copy effortless rather than contested. Products that struggle to phrase inclusive copy in German or Spanish find the problem simply does not arise in Hungarian, and a translator never has to choose between accuracy and neutrality.
In exchange, Hungarian conjugates verbs according to whether their object is definite or indefinite, which is a distinction English does not mark at all.
| Hungarian | English | Object |
|---|---|---|
| Látok egy fájlt | I see a file | indefinite |
| Látom a fájlt | I see the file | definite |
| Mentek egy képet | I save an image | indefinite |
| Mentem a képet | I save the image | definite |
The practical effect is another reason to avoid assembling sentences: whether the object is definite changes the verb ending, and a template that swaps the object cannot adjust the verb to match.
Hungarian also places family names first, as Japanese does. Nagy Péter has the surname Nagy. A form labelled with English field order, or code assembling a display name given-first, produces a name Hungarian users read as reversed.
Formality and the definite article that changes
Hungarian has three levels of address: informal te, formal ön, and the intermediate maga, which is now rare and can sound curt. Software convention has moved decisively toward ön for business contexts and te for consumer products, with maga best avoided entirely.
Both ön and maga take third-person verb forms, as with Italian Lei and Spanish usted, so the change runs through the sentence rather than being confined to the pronoun.
A separate trap sits in the definite article. Hungarian uses a before a consonant and az before a vowel, exactly as English uses a and an — and exactly as unpredictably for a template, since the choice depends on the first sound of a word that may be a variable.
The article depends on the next word
// a fájl (the file)
// az adat (the data)
// a mappa (the folder)
// az e-mail (the email)
//
// 'a :type' is wrong half the time.
This is the same structural problem as Italian elision and French l', and it has the same solution: complete sentences as single keys, never articles concatenated to placeholders.
Layout, accents and formatting
Hungarian expands roughly twenty to thirty per cent over English, and agglutination means individual words can become very long — a stacked chain of suffixes produces single tokens that will not wrap. Plan for German-like overflow behaviour even though the language is unrelated.
The alphabet includes accented vowels with two distinct marks: the acute (á, é, í, ó, ú) and the double acute (ő, ű), which is unique to Hungarian and frequently rendered incorrectly as ö or ü by fonts and by careless data entry. They are different letters, and substituting one for the other is a spelling error.
Multi-character letters — cs, dz, dzs, gy, ly, ny, sz, ty, zs — each count as a single letter for sorting, so a locale-aware collator is required for any alphabetical list.
| Hungarian convention | |
|---|---|
| Thousands | 1 234 567 (space) |
| Decimal | 1234,56 |
| Currency | 1 234 Ft (after the amount) |
| Date | 2026. 03. 21. |
| Long date | 2026. március 21. |
| First day of week | Monday |
Dates run largest unit first, like Japanese and ISO order, and carry a full stop after every component including the final one. Month names are lowercase. The forint has no subunit in practice, so amounts are shown without decimals — formatting them with two is an immediate sign of code written for dollars. Amounts are also commonly large, since a euro is worth several hundred forint, so currency fields need room for more digits than a euro or dollar design assumes.
Designing strings that Hungarian can survive
Because so many Hungarian problems trace back to sentence assembly, the most useful work is done in the source language, before translation starts. A message structured well in English is translatable into Hungarian; one built from fragments is not, and no translator can rescue it.
Write one key per complete message. If English needs six near-identical strings where a template would have needed one, write the six. The duplication feels wasteful and is far cheaper than the alternative, because a template that cannot be translated correctly has to be restructured later anyway — at which point the code, the keys and every existing translation all change together.
Where a variable is genuinely unavoidable, keep it in a position where no suffix or article attaches to it. Quoting the value achieves this: Hungarian readers accept a quoted name in its base form as a citation, and the surrounding grammar attaches to a fixed noun you control rather than to the variable.
Give translators the context, not just the key. Hungarian requires decisions English does not surface — whether the object is definite, which register applies, whether a numeral is present — and a translator working from a bare key such as save has to guess at all of them. A note describing where the string appears and what precedes it costs a sentence and removes most of the ambiguity.
Set the full locale for formatting so dates render in the year-first order with their trailing full stops, and so amounts appear without decimals. And install the Laravel-Lang Hungarian files for framework strings rather than translating validation messages yourself: they already handle the single-plural rule and the definite conjugation correctly across every rule in the framework.
What ships broken most often
- Plural nouns after numbers. 3 fájlok instead of 3 fájl — wrong for every count.
- Suffixes attached to placeholders. Vowel harmony makes the correct suffix undecidable from a template.
- The wrong definite article. a e-mail instead of az e-mail.
- ő and ű rendered as ö and ü. A font or data-entry substitution that produces misspelt words.
- Name order reversed. Family name placed second, as in English.
- Forint shown with decimals. 1 234,00 Ft rather than 1 234 Ft.
- Sorting that splits digraphs. sz treated as s followed by z rather than as one letter.
Hungarian is the clearest demonstration of why sentence assembly is a dead end. In most languages concatenation produces awkward text; in Hungarian it produces text that cannot be made correct by any amount of code, because the required form depends on the vowels of a word chosen at runtime. Structuring translations as complete messages is not a stylistic preference here — it is the only approach that works.
That makes Hungarian unusually valuable as an early target. If your string architecture holds up in Hungarian it will hold up in Finnish, Turkish and Estonian, which share the agglutinative structure, and comfortably in the Slavic and Germanic languages too. Teams that add Hungarian late usually find it forces the restructuring they had been deferring across every other locale.
Framework strings already translated
Laravel's own validation, auth and pagination strings are maintained in Hungarian 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 hu
php artisan lang:update
Translate your app into Hungarian today
Import your lang files, translate every key into Hungarian with one AI click, and publish changes live — no deploy. Set up in 5 minutes.