# Database localization in Rails 3.0: best practices?

**URL:** <https://www.ruby-forum.com/t/database-localization-in-rails-3-0-best-practices/195838>\
**Category:** Rails\
**Created:** [September 30, 2010, 11:30pm UTC](https://www.ruby-forum.com/t/database-localization-in-rails-3-0-best-practices/195838 "2010-09-30T23:30:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clay\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@Clay\_H](https://www.ruby-forum.com/u/Clay_H)\
**Post date:** [September 30, 2010, 11:30pm UTC](https://www.ruby-forum.com/t/database-localization-in-rails-3-0-best-practices/195838/1 "2010-09-30T23:30:33Z")

</div>

Hi, I’m working on a project that has to be localized into 4 different  
languages. I have no problem localizing the non-database-driven  
strings, but there is some database content that also requires  
localization. For instance, one of the fields is a list of different  
types of injuries. Users of this database need the ability to add to  
the list. A translator will work in parallel to convert the entries to  
the other languages. The list of injuries will appear as  
a :collection\_select on forms in the app. The languages are Pashto,  
Urdu, Arabic, and English.

What is the best way to approach localization of columns in the  
database and have it serve the proper entries based on the language  
parameter in the URL (or default to English)?

Thanks,  
Clay

---

<div class="post-metadata">

**Author:** ![Clay\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@Clay\_H](https://www.ruby-forum.com/u/Clay_H)\
**Post date:** [October 1, 2010, 4:40am UTC](https://www.ruby-forum.com/t/database-localization-in-rails-3-0-best-practices/195838/2 "2010-10-01T04:40:05Z")

</div>

Take a look at this

> **[GitHub - svenfuchs/globalize3](https://github.com/svenfuchs/globalize3)**
>
> Contribute to svenfuchs/globalize3 development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Clay\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@Clay\_H](https://www.ruby-forum.com/u/Clay_H)\
**Post date:** [October 1, 2010, 11:45pm UTC](https://www.ruby-forum.com/t/database-localization-in-rails-3-0-best-practices/195838/3 "2010-10-01T23:45:33Z")

</div>

This worked well, thanks. As a followup, is it possible to embed  
hyperlinks in the YAML localization files? The raw HTML displays to  
the page when I try. For example, if I have a localized string called  
suggested\_followup: I would like to do:

en:  
suggested\_followup: "Please visit Google for more information.

ar:  
suggested\_followup: "Arabic version Google of the same string.

Thanks,  
Clay
