# Multiple languages

**URL:** <https://www.ruby-forum.com/t/multiple-languages/113714>\
**Category:** Rails\
**Created:** [September 4, 2007, 9:55am UTC](https://www.ruby-forum.com/t/multiple-languages/113714 "2007-09-04T09:55:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bebitzaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b782af/32.png) [@bebitzaa](https://www.ruby-forum.com/u/bebitzaa)\
**Post date:** [September 4, 2007, 9:55am UTC](https://www.ruby-forum.com/t/multiple-languages/113714/1 "2007-09-04T09:55:31Z")

</div>

How can i make an application with 2 laguages without making a copy of  
the app. Only to define a database of languages and use them.  
Thanks

---

<div class="post-metadata">

**Author:** ![bebitzaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b782af/32.png) [@bebitzaa](https://www.ruby-forum.com/u/bebitzaa)\
**Post date:** [September 4, 2007, 10:07am UTC](https://www.ruby-forum.com/t/multiple-languages/113714/2 "2007-09-04T10:07:11Z")

</div>

Globalize

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

Gokhan  
[www.sylow.net](http://www.sylow.net)  
Barabule Muci wrote:

> How can i make an application with 2 laguages without making a copy of  
> the app. Only to define a database of languages and use them.  
> Thanks

---

<div class="post-metadata">

**Author:** ![bebitzaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b782af/32.png) [@bebitzaa](https://www.ruby-forum.com/u/bebitzaa)\
**Post date:** [September 4, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/multiple-languages/113714/3 "2007-09-04T17:07:00Z")

</div>

Barabule Muci wrote:

> How can i make an application with 2 laguages without making a copy of  
> the app. Only to define a database of languages and use them.  
> Thanks

i suggest you to use database for translations, but in order to avoid  
the call to the db every time you need a set of translations, serilize  
the collection to an xml file on your server, from which you will read.  
any time you make changes on the translations, just reproducte the file.

---

<div class="post-metadata">

**Author:** ![bebitzaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b782af/32.png) [@bebitzaa](https://www.ruby-forum.com/u/bebitzaa)\
**Post date:** [September 4, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/multiple-languages/113714/4 "2007-09-04T17:31:51Z")

</div>

Barabule Muci wrote:

> How can i make an application with 2 laguages without making a copy of  
> the app. Only to define a database of languages and use them.  
> Thanks

also a nice alternative is ruby gettext. with that you can just type  
\_(‘your localized text’)  
in your controllers or views, and run  
rake updatepo  
to create a standard .pot file you can give away to translators that can  
then use the gettext translator gui “poEdit” (available on various  
platforms) or any text-editor to create whatever language version you  
want without the need to access any db or code.  
then copy the returned translation file to your app and run  
rake makemo

works nice even with automatic browser-locale detection so you can  
switch the language in your browser settings.

have a look at this howto:

[http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html](http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html)
