drizzle-i18n is a type-safe database localization layer for Drizzle ORM, at version 0.2.0. It supports two localization strategies: a separate translation table (normalized) or inline JSON column (denormalized), and works with PostgreSQL, MySQL, and SQLite. The package is fully typed with TypeScript, includes mutation helpers for atomic inserts and upserts, and integrates with drizzle-kit for migrations. It has zero runtime dependencies beyond the peer dependency on drizzle-orm >=0.35.0. Differentiators include strict locale typing via createI18n(), fallback support, and a choice between normalized and denormalized schemas. Release cadence is currently low as it is in early development.
npm install drizzle-i18nNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setting up a product table with separate translation table strategy, then querying with locale 'ar' and fallback 'en'.
Pin exact version in package.json (e.g., '0.2.0') and update manually after reviewing changes.
Use import { translationTable } from 'drizzle-i18n/pg' instead of from 'drizzle-i18n'.Use import syntax instead of require().
N/A
Change to import syntax, or set type: 'module' in package.json.
Import from 'drizzle-i18n/pg', 'drizzle-i18n/mysql', or 'drizzle-i18n/sqlite'.
Use import { translationTable } from 'drizzle-i18n/pg' (named import).