Перейти к основному содержимому

DB content i18n (JSONB sidecar + tc())

Generated from mcp/patterns.registry.json — do not edit by hand; change the registry and run bun run patterns:build.

Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.

Category: Internationalization (i18n) · Tier: light · Risk: low — schema convention, no external services

A source-column plus JSONB-sidecar convention (e.g. name / name_i18n) for translating short database fields, resolved at read time by the tc() helper with an explicit locale argument.

When to use: Use when a database field (title, name, summary) needs per-locale translations stored alongside the English canonical value.

Docs

Code


Machine-readable record: i18n-db-content in mcp/patterns.registry.json.

← Back to Pattern Library

Думаете, этот паттерн можно сделать лучше? Расскажите как.

Оставить отзыв