How We Generated 30 Laravel Language Guides Without Writing Filler
We publish a guide per language for Laravel localization — 30 of them, one for Polish, Arabic, Japanese and so on. Each covers the locale codes, plural forms, date formats and per-language gotchas for that specific language.
That's a programmatic content project, and programmatic content has a deservedly poor reputation: take one template, swap a variable, publish 500 near-identical pages. Search engines have policies aimed squarely at that, and readers can tell within a sentence.
We wanted the pages to be worth reading, so we built them differently. Rather than writing prose with slots in it, we execute the real libraries and publish what they return. Here's how it works, including the parts we decided not to do.
The core rule: compute, don't type
Every fact on a language guide is produced by running code. Not looked up once and pasted, not asked of a model — computed at generation time by the same libraries a Laravel app uses.
For plural forms, that means asking Laravel's own MessageSelector how many forms it actually uses:
use Illuminate\Translation\MessageSelector;
$selector = new MessageSelector();
$indexes = [];
foreach (range(0, 200) as $number) {
$indexes[$selector->getPluralIndex($locale, $number)][] = $number;
}
$formCount = count($indexes);
This is the difference that matters. Every localization platform's pluralization page cites CLDR categories. CLDR says Polish has four cardinal categories — one, few, many, other. But Laravel's MessageSelector carries its own rule table derived from Zend Framework code, and for Polish it returns three indexes. Write four forms in a Polish lang file and the fourth is dead.
You only find that by running Laravel's code. We ran it for 30 languages, and the guides report Laravel's number alongside CLDR's, because the discrepancy is the useful part. That's covered in more depth in the trans_choice() deep dive.
CLDR categories and their sample numbers come from ICU via MessageFormatter and Intl.PluralRules-equivalent probes. Date examples come from actually formatting a date:
$date = Carbon::parse('2026-03-21 14:30:00')->locale($carbonLocale);
'date_examples' => [
'iso_format_long' => $date->isoFormat('LLLL'),
'translated_format' => $date->translatedFormat('l j F Y'),
],
Nobody typed "sobota, 21 marca 2026". Carbon produced it. If Carbon's data changes in a future release, regenerating updates the page, and the page was never wrong in between.
What the pipeline looks like
[Curated dataset] [Probes] [Output]
language-meta.php ─┐
├─> seo:generate-language-guides ─> resources/data/
ICU / MessageFormat ─┤ (executes libraries, language-guides/{code}.json
Carbon ─┤ never invents facts) │
Laravel MessageSelector ─┘ ▼
Human review → published_at
The command's signature encodes the workflow:
php artisan seo:generate-language-guides \
--start=2026-08-19 \
--interval=2 \
--draft
--draft writes guides pending review. --start and --interval stagger published_at dates so pages appear one every two days rather than 30 at once. The controller only serves guides whose published_at has passed, so the drip needs no scheduler — it's a date comparison.
The one hand-maintained input is language-meta.php: the curated per-language notes that can't be computed. For Polish:
Seven grammatical cases: noun forms change inside sentences, so avoid raw placeholders in the middle of a phrase.
That's a judgement about writing Laravel translations in Polish. No library returns it. It's the part a human has to know, and it's the part that makes the page worth reading rather than a data dump.
Where AI is and isn't used
We use a model for connective prose — turning computed facts into readable sentences. We do not use it for facts.
The rule is: the model may phrase data it is given; it may never supply data. A model asked "how many plural forms does Laravel use for Polish?" will produce a confident answer that is sometimes wrong, and being wrong on exactly the technical detail someone came to the page for is worse than having no page.
So the generator computes form_count: 3, and prose is written around that number. The number came from MessageSelector.
The rules we set, and why
Every page must answer a real search. Before generating a set, we check the SERP actually exists — that people search "laravel localization polish" or "german plural rules laravel", and that the current results are generic guides rather than something better than we'd make. If a page has nothing to add over what ranks, we don't publish it.
Every page needs data unique to it. Not a swapped adjective — different plural form counts, different date output, different script and direction notes, different gotchas. If two pages in a set would differ only cosmetically, the set is wrong.
A human reviews every page before publishing. 15 to 30 minutes each. Slow by programmatic-content standards, and it's the check that stops us publishing something technically accurate and useless.
Prune what doesn't earn its place. At 90 days, any programmatic page with no impressions gets improved, merged, or noindexed. Leaving thin content live because it exists is how a content set turns into a liability.
What we decided not to build
The rejected ideas are more instructive than the shipped ones.
"How to say X in Y" at scale. Thousands of pages, real search volume, and completely wrong for us: the intent is consumer language learning, not Laravel developers, and we'd have nothing unique per page. This is textbook scaled content abuse and we'd deserve the penalty.
A complete ISO 639-1 directory. Competing with Wikipedia and the Library of Congress on reference data we don't own. No realistic path to ranking, no unique value.
Language-pair pages — es→fr, de→ja, 870 combinations. The tell was that we couldn't articulate what would differ per page beyond two names. If you can't say what makes page 400 different from page 399, don't generate page 400.
The pattern: each rejected set failed the "unique data per page" test. That test is doing real work.
Pairing pages with working tools
One thing that materially changed the quality of this set: several pages link to a tool that does the thing the page describes.
The pluralization tester lets you pick a language and see which CLDR category every number from 0 to 24 falls into, live in your browser. It's the interactive version of a table on the guide.
That pairing came from a competitive observation. Localazy runs a large /convert/* set for format conversion — and their PHP-to-JSON page has no working converter on it. It's content plus a signup prompt. So we built converters that actually convert, client-side, preserving nested keys, :placeholders and plural pipes. Same keyword, a page that does the job instead of describing it.
That's the version of "engineering as marketing" worth doing: if the page is about a computation, run the computation.
Storage: JSON files, not database rows
A small decision that turned out to matter. Each guide is a JSON file in resources/data/language-guides/, not a database record.
{
"code": "pl",
"slug": "polish",
"name": "Polish",
"native_name": "Polski",
"script": "Latin",
"direction": "ltr",
"regional_locales": ["pl_PL"],
"laravel_plural": { "form_count": 3, "indexes": ["1", "2–4, 22–24, …", "0, 5–21, …"] },
"cldr_categories": { "one": { "samples": "1" }, "few": { "samples": "2–4, 22–24, …" } },
"published_at": "2026-08-19",
"generated_at": "2026-07-13"
}
Three benefits we didn't fully anticipate.
Regeneration diffs are reviewable. Re-run the generator after a Carbon upgrade and git diff shows exactly which facts changed across 30 languages. If a date format shifted, you see it. With database rows, that's an audit table you'd have to build.
Review happens in a pull request. The human review step is code review — the tool the team already uses — rather than a bespoke admin screen.
No migration, no seeder, no environment drift. The content is the same in local, staging and production because it's in the repository. This is the same argument that makes lang files attractive, and it holds for the same reasons.
The trade is that a non-developer can't edit a guide, and updating one means a deploy. For 30 pages of computed technical reference maintained by developers, that's the right trade. For interface copy edited by whoever notices a typo, it isn't — which is the distinction the lang files vs TMS post draws.
The published_at field doing double duty as the drip mechanism is the neatest part. LanguageGuideService::published() filters on it, and a guide with a future date 404s until its day arrives. No queue, no cron, no publishing state machine — one date comparison. We later applied the same pattern to the blog.
Honest results and caveats
Some transparency about the limits, since this is a post about method.
The set is dripping out over roughly two months, and it's too early for meaningful ranking data. I'd rather describe the method than publish encouraging early numbers that regress.
The approach has real constraints. It only works where you have computable facts — we could do this for languages because ICU and Carbon are authoritative sources we can query. For a topic with no computable substance, this pipeline gives you nothing, and template-plus-variables is the only thing left, which is exactly what you shouldn't publish.
And the human review is a genuine bottleneck. 30 pages at 20 minutes is ten hours. That's the cost of the quality bar, and it's why we haven't generated the 40-term glossary and the language guides simultaneously.
If you're doing this
The transferable parts:
- Find a computable source of truth and query it. Don't paste, don't ask a model for facts.
- Verify demand per set, not per page, before generating anything.
- Require unique data per page. If you can't say what differs, don't publish it.
- Use AI for phrasing, never for facts.
- Review every page. If that's too expensive, generate fewer pages.
- Drip via a date field, not a scheduler.
- Prune on a timer. Set the date when you publish.
- Build the tool if the page describes a computation.
The generator is 274 lines. The dataset of human notes took longer to write than the code, which is roughly the right ratio.
If you're localizing a Laravel app, the language guides are the output of all this — per-language locale codes, plural form counts as Laravel actually resolves them, date formats and gotchas. The free tools are the interactive half. And if the underlying problem is that changing a translation means a deploy, that's what LangSyncer is for.
More on Architecture & Tooling
-
How Laravel Actually Loads Translations (And Why There's No lang:cache)
artisan optimize caches config, routes, events and views — not translations. Here's what the translator does on every request, why that's usually fine, and when it isn't.
-
Laravel Translation Manager Packages: What They Solve and Where They Stop
A database-backed admin UI over your lang files solves the non-developer problem and creates three new ones. Here's the honest accounting before you install one.
-
JSON vs PHP Lang Files in Laravel: Performance, Tooling and When to Use Each
PHP files load one group at a time; a JSON file loads entirely on the first lookup. Nested JSON silently doesn't work. Here's what actually differs, verified against the framework.