# Multilingual web application

**URL:** <https://www.ruby-forum.com/t/multilingual-web-application/111362>\
**Category:** Rails\
**Created:** [August 6, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/multilingual-web-application/111362 "2007-08-06T15:09:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![poetry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c5a1d2/32.png) [@poetry](https://www.ruby-forum.com/u/poetry)\
**Post date:** [August 6, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/multilingual-web-application/111362/1 "2007-08-06T15:09:12Z")

</div>

Hi list,

I have a more conceptual question. I want to create a multilingual web  
application. I have the models “product” and “product\_name”. Each  
“product\_name” contains a product\_id, a language\_id and a string value  
for name.

First question: Is this the usual way for crating a multilingual  
application?  
Second question: Should I save the user preferred language (the user  
is anonymous) in the cookies? If yes how should I define ‘name’ in my  
active record Product?  
Say, I want to write following.

p = Product.find(123)  
puts p.name # the name for the preferred language

How should I define ‘name’ in app/model/product.rb ?

Thanks,  
peotry

---

<div class="post-metadata">

**Author:** ![poetry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c5a1d2/32.png) [@poetry](https://www.ruby-forum.com/u/poetry)\
**Post date:** [August 10, 2007, 12:16am UTC](https://www.ruby-forum.com/t/multilingual-web-application/111362/2 "2007-08-10T00:16:13Z")

</div>

Hi list,

I found the answer.

[http://www.globalize-rails.org](http://www.globalize-rails.org)

---

<div class="post-metadata">

**Author:** ![poetry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c5a1d2/32.png) [@poetry](https://www.ruby-forum.com/u/poetry)\
**Post date:** [August 24, 2007, 12:37am UTC](https://www.ruby-forum.com/t/multilingual-web-application/111362/3 "2007-08-24T00:37:15Z")

</div>

On 8/9/07, poetry [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi list,
> 
> I found the answer.
> 
> [http://www.globalize-rails.org](http://www.globalize-rails.org)

Its not the only answer. There must be at least 7 different ways of  
internationalising  
your web app in Rails/Ruby now. Globalise is a strong contender, but  
there are  
strengths to the others depending on your needs.

There is no straight answer to what you should be doing. But most  
sites on the internet  
would use a combination of default==HTTP header locale, and user  
selectable options  
in their profile.
