Lingua Detective vs franc: language-detection library vs full-site audit
Verdict: If you need to classify a string of text into one of 180+ languages inside a Node.js app, franc is free, fast, and hard to beat — use it directly. If you need to know whether an entire multilingual website is actually serving the right language on every page, including JavaScript-rendered ones, you need more than a detection function: a crawler, a renderer, boilerplate handling, and a verdict per page — which is what Lingua Detective adds on top.
| franc | Lingua Detective | |
|---|---|---|
| What it is | Open-source JavaScript library for language detection via trigram analysis | Managed service that crawls a site and audits every page's actual language |
| Setup | npm install franc, call franc(text) in your own code | Give it a URL or a list of URLs — no code, no server to maintain |
| Pricing | Free, no account | Free trial (20 pages, no account/card); then $0.015→$0.010→$0.006/page, +$0.005/page if it crawls for you; or pay-per-call API from $0.002 |
| Privacy / offline | Fully offline — text never leaves your process | Offline detection engine by default; uncertain pages can optionally go to AI arbitration |
| Output | An ISO 639-3 language code (or ranked guesses) for a string you supply | A per-page verdict — Conforming, Non-conforming, Uncertain, Error, or Undetermined — plus a site report |
| Best for | Developers embedding language ID in an app or data pipeline | Teams that need an auditable view of a whole multilingual site, not a single string |
Pick franc if…
- You're already in a JavaScript/TypeScript codebase and want a small, dependency-light library you call directly.
- You're classifying strings or snippets you already have in hand, not full rendered web pages.
- You don't need crawling, JS rendering, or boilerplate (nav/footer/cookie banner) filtering — you're happy to write that yourself.
- Your budget for this is zero and you're comfortable owning the integration, retries, and edge cases.
- You want full control over thresholds and how detection plugs into your own pipeline.
Pick Lingua Detective if…
- You need to check hundreds or thousands of pages on a real site, including JavaScript-rendered ones, not text you've already extracted.
- You want a verdict per page — and a report you can hand to an SEO or compliance stakeholder — not a raw language code.
- You'd rather not build and maintain a crawler, a headless renderer, and boilerplate-stripping logic around franc yourself.
- Borderline pages — mixed-language, thin content — matter to you, and you want those escalated to AI arbitration instead of silently misclassified.
- You want recurring, scheduled audits without owning any crawling or rendering infrastructure.
Pricing math
Auditing a 500-page site with URLs supplied: the first 200 pages bill at $0.015 ($3.00), the next 300 at $0.010 ($3.00), for $6.00 total. Ask Lingua Detective to crawl the site itself and discover the pages, and the spider adds $0.005/page (+$2.50), bringing it to $8.50. Building the equivalent around franc means adding your own crawler, a headless browser for JS-rendered templates, and boilerplate stripping — none of which franc itself provides, and all of which take real engineering time to build and keep working.
FAQ
Q: Can franc detect the language of a live web page?
No — franc classifies text you pass it. Crawling, rendering JavaScript, and stripping repeated template text are separate problems it doesn't solve.
Q: Does Lingua Detective replace franc?
Not exactly — Lingua Detective runs its own offline detection engine, then adds crawling, rendering, per-page verdicts, and optional AI arbitration on top.
Q: Is franc accurate on very short text?
Trigram-based detectors like franc do best above roughly 50 characters; very short or mixed-language snippets are more error-prone.