# Switching web page languages - how?

**URL:** <https://www.ruby-forum.com/t/switching-web-page-languages-how/74199>\
**Category:** Rails\
**Created:** [November 1, 2006, 1:15pm UTC](https://www.ruby-forum.com/t/switching-web-page-languages-how/74199 "2006-11-01T13:15:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rhaus](https://www.ruby-forum.com/u/rhaus)\
**Post date:** [November 1, 2006, 1:15pm UTC](https://www.ruby-forum.com/t/switching-web-page-languages-how/74199/1 "2006-11-01T13:15:08Z")

</div>

Is there support to somehow automate the localization of web pages in  
Rails? I need to create an application that must allow the user to  
dynamically switch between several languages – luckily, all of them  
left-to-right languages.

Most guides and books do not even mention that issue and assume everyone  
is using English. Are there any guides or documentation about how to  
best do this?

---

<div class="post-metadata">

**Author:** ![rhaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rhaus](https://www.ruby-forum.com/u/rhaus)\
**Post date:** [November 1, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/switching-web-page-languages-how/74199/2 "2006-11-01T23:04:29Z")

</div>

Roman H. wrote:

> Is there support to somehow automate the localization of web pages in  
> Rails? I need to create an application that must allow the user to  
> dynamically switch between several languages – luckily, all of them  
> left-to-right languages.
> 
> Most guides and books do not even mention that issue and assume everyone  
> is using English. Are there any guides or documentation about how to  
> best do this?

Roman

1. gem install localization\_generator
2. edit envrionments.rb, application.rb (as per docs)
3. done

---

<div class="post-metadata">

**Author:** ![rhaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rhaus](https://www.ruby-forum.com/u/rhaus)\
**Post date:** [November 1, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/switching-web-page-languages-how/74199/3 "2006-11-01T23:58:25Z")

</div>

Ilan B. wrote:

> Roman H. wrote:
> 
> > Is there support to somehow automate the localization of web pages in  
> > Rails? I need to create an application that must allow the user to  
> > dynamically switch between several languages – luckily, all of them  
> > left-to-right languages.
> > 
> > Most guides and books do not even mention that issue and assume everyone  
> > is using English. Are there any guides or documentation about how to  
> > best do this?
> 
> Roman
> 
> 1. gem install localization\_generator
> 2. edit envrionments.rb, application.rb (as per docs)
> 3. done

Thanks for the info … is there also a way to localize the messages  
that are generated by validates… and which appear in the flash? Not  
sure if there are any other messages that rails will show to the user  
eventually, but I would need to localize all of them.

---

<div class="post-metadata">

**Author:** ![rhaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rhaus](https://www.ruby-forum.com/u/rhaus)\
**Post date:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/switching-web-page-languages-how/74199/4 "2006-11-07T10:51:33Z")

</div>

Rails doesn’t support i18n (Internationalization) yet.

You could check out the Globalize plugin, perhaps that already fits  
what you are looking for.

---

<div class="post-metadata">

**Author:** ![rhaus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e68b1a/32.png) [@rhaus](https://www.ruby-forum.com/u/rhaus)\
**Post date:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/switching-web-page-languages-how/74199/5 "2006-11-07T10:51:34Z")

</div>

On 11/1/06, Roman H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there support to somehow automate the localization of web pages in  
> Rails? I need to create an application that must allow the user to  
> dynamically switch between several languages – luckily, all of them  
> left-to-right languages.
> 
> Most guides and books do not even mention that issue and assume everyone  
> is using English. Are there any guides or documentation about how to  
> best do this?

Have a look at:  
[http://raa.ruby-lang.org/project/ruby-gettext/](http://raa.ruby-lang.org/project/ruby-gettext/)

Isak
