finds.dev← search

// the find

shioyama/mobility

★ 1,133 · Ruby · MIT · updated Mar 2026

Pluggable Ruby translation framework

Mobility is a translation framework for Ruby that abstracts where translated attributes are stored — shared key-value tables, per-model translation tables, PostgreSQL jsonb/hstore columns, or plain locale-suffixed columns. It works with both ActiveRecord and Sequel, and the storage backend is swappable without changing your model interface. Aimed at Rails apps that need to store user-facing content in multiple languages.

The plugin system is genuinely well-designed: fallbacks, dirty tracking, caching, and querying are all opt-in plugins that compose cleanly rather than being baked into a monolith. The query interface is backend-agnostic — you write `Post.i18n.where(title: 'foo')` and Mobility generates the right SQL regardless of whether you're using key-value tables or jsonb. Sequel support is a real differentiator; most Rails i18n gems drop you the moment you leave ActiveRecord. The shared spec suite for backends means custom backends get correctness validation for free.

The default KeyValue backend generates gnarly multi-join SQL for every translated attribute lookup — querying a post by two translated fields produces a query with two separate table joins, which kills performance at any real scale. Dirty tracking with fallthrough accessors is explicitly documented as slow and requires locale_accessors enabled for all locales to avoid method_missing overhead, which is a footgun for large locale sets. The library is maintained by one person and stars (1133) suggest limited adoption outside a small niche, which means you're betting on a solo maintainer for a core data concern. There's no built-in support for translation completeness tracking or missing-translation reporting — you have to wire that up yourself.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →