Back to browse
I Built a Polyfill for the Browser's New Language Detection API

I Built a Polyfill for the Browser's New Language Detection API

by unforbiddenYet·May 5, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainNiche Gem

Uses Google's CLD3 neural net to match Chrome's native API behavior exactly.

Strengths
  • Spec-compliant interface means zero refactoring when native support lands.
  • Automatically detects native support and steps aside to avoid overhead.
  • Bundles the actual CLD3 model weights for consistent detection accuracy.
Weaknesses
  • CLD3 model weights add significant bundle size compared to lightweight heuristics.
  • Limited utility until more browsers adopt the underlying experimental API spec.
Target Audience

Frontend developers building multilingual applications

Similar To

core-js · polyfill.io

Post Description

Only Chrome shipped the experimental Web API that I need for cross-browser content moderation. So I built the polyfill myself and open-sourced it.

Issues and PRs are very welcome – this is a young project, and there’s room to improve it.

Similar Projects

AI/ML●●Solid

An experimental tensor DSL/compiler with explicit scheduling

Three-concept scheduling model targeting FlashAttention, but generated code isn't performant yet.

Big BrainBold Bet
loganboyd
5113d ago

A Working Python VM Written Entirely in PL/PgSQL

This repo literally turns CPython internals into rows and stored procedures: object rows, regproc type slots, and an interpreter loop (py_eval_frame) that dispatches opcode handler functions in SQL. It's a clever, hands-on exploration — 103 SQL files, a REPL and 87 tests show serious follow-through — but it's primarily an impressive engineering demo rather than a practical production runtime.

WizardryNiche Gem
cykim8811
114mo ago
AI/MLMid

Agentic Algorithm Engineering

Academic methodology doc, not a working tool — agent frameworks already do this loop.

Bold BetNiche Gem
0x23
102mo ago