Database

Database i18n Architecture

Design database schemas for multilingual applications. PostgreSQL JSONB vs translation tables. Query patterns, indexing, and performance at scale.

Use Cases

How teams use database content localization in practice.

Product Catalogs

E-commerce products with localized names, descriptions, and attributes. High read volume.

CMS Content

Articles, pages, and rich content stored in database. Editorial workflow across languages.

User-Generated Content

Reviews, comments, listings. Machine translation stored alongside user-provided content.

Configuration & Settings

Localized dropdown options, category names, and system configuration strings.

Common Challenges

What makes database content localization difficult.

Schema Complexity

Many approaches: column per language, JSON blob, separate translation table. Each has trade-offs in query complexity and flexibility.

Query Performance

Fetching localized content adds JOINs or JSON extraction. Indexing strategies differ by approach.

Adding Languages

Column-per-language requires migrations. Other approaches are more flexible but have different trade-offs.

Fallback Logic

What if translation is missing? Fall back to default language? Show nothing? Needs application logic.

Full-Text Search

Searching across languages requires language-specific analyzers. One index or multiple?

How IntlPull Helps

Purpose-built features for database content localization.

JSONB Translation Column

Store translations as JSONB: {"en": "Hello", "es": "Hola"}. Flexible, no migrations for new languages. Good for moderate complexity.

vs column-per-language rigidity

Separate Translation Table

Normalize into translations table: (entity_id, field, locale, value). Most flexible. JOINs required.

vs denormalized JSON

Hybrid Approach

Main content in primary table. Translations in separate table. Best for complex content with many translated fields.

vs single-pattern constraint

Query Helpers

PostgreSQL functions to extract translations with fallback. Simplify application code. Consistent behavior.

vs duplicated query logic

Materialized Views

Pre-compute joined content per locale. Fast reads. Refresh on content change. Good for read-heavy workloads.

vs runtime JOINs

Language-Specific Indexes

GIN indexes for JSONB. Partial indexes per language. Full-text indexes with language-specific dictionaries.

vs unindexed queries

Best Practices

Proven approaches for database content localization success.

Choose Based on Query Patterns

Read-heavy with few languages? JSONB. Many languages with complex queries? Separate table. Analyze your access patterns.

Index for Your Queries

JSONB: GIN index on translations column. Separate table: composite index on (entity_id, locale). Profile before optimizing.

Handle Fallbacks at Query Time

COALESCE in SQL or application logic. Decide fallback strategy early: default language, empty string, or error.

Consider ORM Support

Some ORMs have i18n plugins. Prisma, TypeORM, Sequelize handle this differently. Choose schema compatible with your ORM.

Plan for Translation Sync

How do translations from IntlPull get into your database? Import script, API sync, or direct integration?

Frequently Asked Questions

Ready to Localize Your Database Content?

Start with our free tier. No credit card required.

    Database i18n Patterns Guide | IntlPull | IntlPull