Laravel localization in Malay Bahasa Melayu
Everything you need to ship Malay 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
ms
Script / Direction
Latin · LTR
Plural forms (Laravel)
1
Text vs English
Similar
Locale codes
Set the base locale in config/app.php. For regional variants,
Malay commonly uses:
ms_MY, ms_BN, ms_SG
// config/app.php
'locale' => 'ms',
'fallback_locale' => 'en',
// Or switch at runtime
App::setLocale('ms');
Plural rules: what Malay actually needs
CLDR defines 1 cardinal category for Malay. The sample numbers below were computed by ICU for this exact locale:
| CLDR category | Numbers that select it |
|---|---|
| other | 0–130, 200, 1000, 1000000, 1.5 |
Laravel's trans_choice() maps numbers to
1 pipe-separated
form for this locale:
| Form index | Numbers that select it |
|---|---|
| 0 | 0–130, 200, 1000 |
// lang/ms/messages.php
'items' => ':count'
// Usage
trans_choice('messages.items', $count, ['count' => $count]);
This language has no grammatical plural, so a single form covers every number.
Try any number live in the pluralization tester.
Localized dates with Carbon
Real output for Malay (ms locale),
generated by Carbon for March 21, 2026:
$date = now()->locale('ms');
$date->translatedFormat('l, j F Y');
// "Sabtu, 21 Mac 2026"
$date->isoFormat('LLLL');
// "Sabtu, 21 Mac 2026 pukul 14.30"
$date->isoFormat('L');
// "21/03/2026"
$date->subDays(3)->diffForHumans();
// "3 bulan yang lepas"
What to watch out for in Malay
- No plural inflection (optional reduplication: buku-buku) and no verb tense conjugation.
- No grammatical gender; polite second person Anda is common in formal UI copy.
- Malaysia uses the decimal point with comma thousands separator (1,234.56), unlike Indonesian.
Malay and Indonesian are not the same language
Malay and Indonesian share a common ancestor and remain largely mutually intelligible, which regularly tempts teams into shipping one translation to both markets. The differences are concentrated in exactly the everyday and technical vocabulary an interface is made of, so users notice immediately.
| English | Malay (ms) | Indonesian (id) |
|---|---|---|
| car | kereta | mobil |
| office | pejabat | kantor |
| can / may | boleh | bisa |
| afternoon | petang | sore |
| free of charge | percuma | gratis |
| shop | kedai | toko |
Some pairs are worse than unfamiliar. Kereta is a car in Malay and a train in Indonesian; percuma means free of charge in Malay and pointless in Indonesian. A shared translation therefore does not merely read as foreign, it occasionally says something else.
Malay is official in Malaysia, Brunei and Singapore, with Malaysian and Bruneian usage differing slightly again. Treat ms and id as separate locales with separate translation memories — a shared memory will propagate each vocabulary into the other over time, producing a hybrid that serves neither market.
Singapore complicates the picture usefully. Malay is one of its four official languages and its national language, but English dominates commercially, so a Singaporean product may need Malay for official or public-facing purposes while most users read English. Decide what role the locale is playing before budgeting for it.
Almost no grammar to get wrong
Malay is analytic and remarkably regular. There is no grammatical gender, no verb conjugation for person or number, no tense inflection, no case system and no articles. Words keep one form regardless of their role in the sentence.
For software this means placeholders behave predictably. A noun interpolated into a sentence needs no case ending, no article agreement and no gender concord, so the class of defect that dominates German, Polish, Finnish and Korean localisation simply does not arise.
CLDR gives Malay a single plural category, so trans_choice() takes one form for every number. Plurality is conveyed by context or by reduplicating the noun — buku is book or books, buku-buku emphasises plurality — and crucially, reduplication is not used when a number is present.
One form, and no reduplication after a numeral
// lang/ms/messages.php
'files' => ':count fail',
// 0 -> 0 fail
// 1 -> 1 fail
// 42 -> 42 fail
//
// ':count fail-fail' is wrong for every number.
A translator working from an English source with singular and plural forms may supply a reduplicated noun for the second, producing text that is wrong wherever a count appears. It is the one plural mistake worth checking for explicitly.
Affixation is where the words change
What Malay lacks in inflection it makes up for in derivation. Prefixes, suffixes and circumfixes combine with a root to build related words, and the resulting forms can look quite different from the root.
| Form | Word | Meaning |
|---|---|---|
| root | simpan | store |
| me- prefix | menyimpan | to save |
| di- prefix | disimpan | is saved |
| pe-an circumfix | penyimpanan | storage |
| ter- prefix | tersimpan | saved (state) |
The prefix can alter the first letter of the root — me- plus simpan gives menyimpan, not mesimpan — so prefix-based search matching will fail to connect related words. A user typing simpan expects to find menyimpan and penyimpanan, and substring matching will not.
Enable a Malay or Indonesian stemmer in your search engine; most ship one, and the difference in result quality is substantial. This is the single highest-value infrastructure change for Malay, since the grammar asks for nothing else.
Reduplication interacts with search in the same way. A user searching for buku should find buku-buku, and a hyphen-splitting tokeniser will index the two halves separately, producing duplicate terms that dilute relevance. A proper analyser handles both the affixes and the reduplication together.
Affixation also drives text expansion. Malay runs roughly twenty to thirty per cent longer than English, largely because a single English word often becomes an affixed form plus a helper word.
Formality, honorifics and script
Malay distinguishes formality through pronoun choice rather than through grammar, so the decision is a matter of tone and can be revisited far more cheaply than in German or Korean.
| Pronoun | Register | Used for |
|---|---|---|
| Anda | Formal, neutral | Standard for software |
| Awak / Kamu | Informal | Casual consumer apps |
| Encik / Puan | Honorific | Customer service, correspondence |
| Tuan / Cik | Honorific | Formal address |
Anda is the safe default and is conventionally capitalised. Malaysian culture is more formal than Indonesian in commercial communication, so the informal pronouns are used more sparingly here than across the border.
Malay is written in the Latin alphabet (Rumi) in all ordinary contexts, with no diacritics, so encoding, sorting, case conversion and search all behave exactly as they do in English. There is no collation to configure and no multi-byte trap in case transformations.
An Arabic-derived script called Jawi also exists and retains official status in Brunei and ceremonial use in parts of Malaysia. It is right-to-left and would need the full RTL treatment, but it is not used in mainstream software and you are unlikely to need it unless a specific requirement calls for it.
Formatting across three markets
Malay is spoken across Malaysia, Brunei and Singapore, and the formatting conventions differ enough that a single locale will be wrong somewhere. The currency differs in all three.
| Malaysia (ms_MY) | Brunei (ms_BN) | Singapore (ms_SG) | |
|---|---|---|---|
| Currency | RM1,234.56 | B$1,234.56 | S$1,234.56 |
| Thousands | 1,234,567 | 1,234,567 | 1,234,567 |
| Decimal | 1234.56 | 1234.56 | 1234.56 |
| Short date | 21/03/2026 | 21/03/2026 | 21/03/2026 |
| First day of week | Monday | Monday | Sunday |
Numbers follow English conventions — comma for thousands, full stop for decimals — which is a notable difference from Indonesian, where the separators are the European way round. Shipping Indonesian number formatting to Malaysia produces amounts that are off by orders of magnitude to a reader parsing them literally.
Month names are capitalised, as in Indonesian and English, and dates are day-first. Malaysia observes several religious and state holidays whose dates move with the lunar calendar, and each state has its own additional holidays, so business-day calculations need real holiday data rather than a weekday rule.
Friday afternoon is also a partial working day in several Malaysian states for prayers, and two states observe a Friday and Saturday weekend rather than Saturday and Sunday. Any feature promising a delivery date, a response time or a business-day deadline needs state-level data to be accurate, and a single national calendar will be wrong for a meaningful share of users.
Getting Malay into the application
Malay asks very little of your infrastructure, which is worth stating plainly because it means the effort can go where it actually pays. Latin script with no diacritics means default collation sorts correctly, case conversion is safe with ordinary string functions, and there is no encoding consideration beyond using UTF-8 as you would anyway.
Set the full locale nonetheless, and pay particular attention to the number separators. Malay uses the English convention while Indonesian uses the European one, so a shared South-East Asian formatting helper will be wrong for one of them, and the failure mode is an amount misread by a factor of a thousand rather than a cosmetic difference.
Store the market separately from the language. A user may read Malay in Malaysia, Brunei or Singapore, and the currency differs in all three while the language does not. Conflating the two into one locale code means the first multi-country customer forces a data migration.
Invest in the glossary rather than in tooling. Because Malay borrows English technical vocabulary inconsistently across the industry, terminology drift is the dominant quality problem — muat turun and download both appear in real Malaysian software, and mixing them across screens is what users notice. A short list of settled terms given to every translator prevents an interface that speaks two vocabularies.
Install the Laravel-Lang Malay files for framework strings. There is less linguistic complexity to get right than in most locales, but the messages are already translated in a consistent register, and writing your own leaves a second vocabulary to keep aligned with the first.
What ships broken most often
- Indonesian shipped as Malay. Or the reverse — mutually intelligible is not interchangeable, and some pairs mean different things.
- Indonesian number separators. Malay uses the English convention; Indonesian uses the European one.
- Reduplicated nouns after numbers. 3 fail-fail instead of 3 fail.
- Search that cannot match affixed forms. No stemmer, so simpan misses menyimpan.
- One currency assumed across three markets. Ringgit, Brunei dollar and Singapore dollar are distinct.
- Weekday-only business logic. State-level and lunar holidays that a simple rule will miss.
- Truncated labels. Affixed forms overflowing buttons sized for English.
Malay is among the cheapest locales to support well, because almost all of the usual difficulty is absent. The effort goes into vocabulary consistency, keeping it genuinely separate from Indonesian, and enabling a stemmer — none of which requires changes to how your strings are structured.
That makes Malay a sensible early locale for validating a localisation pipeline. Because it exercises the plumbing — locale resolution, formatting, fallbacks, coverage checks — without adding grammatical complexity on top, a defect that appears in Malay is almost certainly a problem in your infrastructure rather than in the translation, which makes it unusually easy to diagnose.
English proficiency is high across all three Malay-speaking markets, so missing translations produce no complaints and persist indefinitely. Verify coverage with a key-parity check in CI rather than waiting for reports that will not arrive.
Framework strings already translated
Laravel's own validation, auth and pagination strings are maintained in Malay 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 ms
php artisan lang:update
Translate your app into Malay today
Import your lang files, translate every key into Malay with one AI click, and publish changes live — no deploy. Set up in 5 minutes.