~bounga/public-inbox

Re: Translating ActiveRecord data using JSON

Details
Message ID
<m27cqkdmxo.fsf@bounga.org>
DKIM signature
missing
Download raw message
For the sake of history, here is a comment posted on Disqus
(discontinued on bounga.org) from Chris Salzberg:

> Hi there, nice post! I maintain a gem called Mobility
> (https://github.com/shioyama... which allows you to store translations
> in many formats, including json/jsonb/hstore but also as separate
> columns, or on a separate translation table (like Globalize), or on a
> shared table with a polymorphic relation (called KeyValue). The
> interface is the same whichever storage strategy (backend) you use. It
> has all the standard features: fallbacks, cache, locale accessors
> (title_en, title_ja, etc.) as other translation gems, in the form of
> "plugins" which are only included if you enable them (so minimum
> "class pollution").

> Inspired by the Elixir library named Trans
> (https://hex.pm/packages/trans), Mobility recently also added a new
> backend (called "Container") which allows you to store all your model
> translations for a given model in a single column called
> "translations", which is a depth-2 json or jsonb column. This has some
> nice advantages since it means you don't need to add migrations to add
> new translated attributes to a model.
--
Nicolas Cavigneaux
https://www.bounga.org
https://www.cavigneaux.net
Reply to thread Export thread (mbox)