# Loading an entire translation set from a database column

**URL:** <https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519>\
**Category:** Rails I18n\
**Created:** [July 15, 2011, 2:42pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519 "2011-07-15T14:42:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [July 15, 2011, 2:42pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519/1 "2011-07-15T14:42:29Z")

</div>

Is it at all possible for me to load the monolithic YAML from a database  
column, as opposed to using a file load path?

I’m working on a multi-site CMS and rather than have programmers  
tediously  
enter each translation in CRUD fashion, I just need them to be able to  
add  
to the existing locale on the fly.

I basically want a table of locales which only have one column, to hold  
the  
YAML text you’d normally put in the locale file.

Any ideas?

---

<div class="post-metadata">

**Author:** ![sgarcia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@sgarcia](https://www.ruby-forum.com/u/sgarcia)\
**Post date:** [July 15, 2011, 3:12pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519/2 "2011-07-15T15:12:46Z")

</div>

Do you know Tolk?  
[https://github.com/dhh/tolk](https://github.com/dhh/tolk)

2011/7/15 Steven G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![sgarcia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@sgarcia](https://www.ruby-forum.com/u/sgarcia)\
**Post date:** [July 15, 2011, 7:31pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519/3 "2011-07-15T19:31:28Z")

</div>

Hmm that looks like it just might do the trick. Thanks andres, gonna  
give it  
a whirl

---

<div class="post-metadata">

**Author:** ![sgarcia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@sgarcia](https://www.ruby-forum.com/u/sgarcia)\
**Post date:** [July 15, 2011, 7:35pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519/4 "2011-07-15T19:35:47Z")

</div>

Yikes, that is one complex looking beast - definitely more than I need.  
Will  
probably just McGuyver up something myself

cheers tho!

---

<div class="post-metadata">

**Author:** ![sgarcia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@sgarcia](https://www.ruby-forum.com/u/sgarcia)\
**Post date:** [July 15, 2011, 7:42pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519/5 "2011-07-15T19:42:35Z")

</div>

You can plug different backends into Rails i18n. Not sure what the  
latest and greatest is, but this should get you started:

> **[Rails Internationalization (I18n) API — Ruby on Rails Guides](https://guides.rubyonrails.org/i18n.html#using-different-backends)**
>
> Rails Internationalization (I18n) APIThe Ruby I18n (shorthand for internationalization) gem which is shipped with Ruby on Rails (starting from Rails 2.2) provides an easy-to-use and extensible framework for translating your application to a single...

> <https://stackoverflow.com/questions/1346939/rails-store-translations-in-database>

---

<div class="post-metadata">

**Author:** ![sgarcia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@sgarcia](https://www.ruby-forum.com/u/sgarcia)\
**Post date:** [March 13, 2012, 12:44pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519/6 "2012-03-13T12:44:55Z")

</div>

Hey Steven,

In fact I also don’t have Idea but may be somebody know and respond us  
for this postfix. I am also waiting for appropriate and ideal react.

> **[Launching the Human Translations API - Quick, Easy and Reliable!](https://translatebyhumans.com/blog/human-translation-api/)**
>
> The Human Translations API aims to provide a solution to our users with bulk translation needs. Clients can easily place an order from their system directly into ours.
