# Globalize newbie

**URL:** <https://www.ruby-forum.com/t/globalize-newbie/72098>\
**Category:** Rails I18n\
**Created:** [October 14, 2006, 4:35am UTC](https://www.ruby-forum.com/t/globalize-newbie/72098 "2006-10-14T04:35:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [October 14, 2006, 4:35am UTC](https://www.ruby-forum.com/t/globalize-newbie/72098/1 "2006-10-14T04:35:02Z")

</div>

hey all,  
I’ve just installed globalize, I did the svn checkout and the rake  
globalize:setup command.  
Now I want to translate some of the string in my views, as an example  
\<%=  
“some strings”.t %\> but I don’t know how to do this. I mean, I know I  
need  
to put the .t thing but then where do I put the translated string and  
the  
language I want to translate it to? I searched through the wiki but  
couldn’t  
find it. I know that’s some basic stuff but I have no idea how to do it.  
☹  
Any idea?

thanx in advance

Pat

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [April 13, 2007, 12:48pm UTC](https://www.ruby-forum.com/t/globalize-newbie/72098/2 "2007-04-13T12:48:10Z")

</div>

Hi Patrick,

I’m exactly in the same situation than you!!!  
If someone could help us…  
I’ve looked at a lot of tutorials but I can’t make it works. Does  
someone has a good tutorial which explain that step by step?

THANKS!

Monica

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [April 13, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/globalize-newbie/72098/3 "2007-04-13T13:15:56Z")

</div>

Hi guys, and welcome aboard!

You’ll find the answer in Sven’s excellent tutorial:

[http://www.artweb-design.de/2006/11/10/globalize-five-minutes-instant-overview](http://www.artweb-design.de/2006/11/10/globalize-five-minutes-instant-overview)

It’s under the heading “How to add ViewTranslations”:

lang = Language.pick(‘de-DE’)  
Locale.set\_translation(‘Welcome’, lang, ‘Willkommen’)

The idea is to create a web interface in your app that will call this  
code and allow the translator to translate your site online.

Best,  
Josh

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [April 13, 2007, 1:47pm UTC](https://www.ruby-forum.com/t/globalize-newbie/72098/4 "2007-04-13T13:47:00Z")

</div>

The answer is that there are many answers 🙂

Basically your translations are stored in a database table (named  
globalize\_translations). So what you are looking for is a way to edit  
rows in the database table.

You could edit the rows directly by using a console client, a  
database web interface or gui client.

You can build your own translation manager web interface on Rails -  
which is what Szymek guides you through here: \<http://wiki.globalize-  
[rails.org/globalize/show/Example+Application](http://rails.org/globalize/show/Example+Application)\>

Or you can add translations “manually” through your own code (i.e. in  
the script/console). I’ve mentioned an example of this here: \<http://  
[www.artweb-design.de/2006/11/10/globalize-five-minutes-instant-overview](http://www.artweb-design.de/2006/11/10/globalize-five-minutes-instant-overview)\>

Hope this helps to get you started.

Am 13.04.2007 um 12:48 schrieb Monica Saiz:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Railsi18n-discussion mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/railsi18n-discussion](http://rubyforge.org/mailman/listinfo/railsi18n-discussion)

–  
sven fuchs fon: +49 (58 45) 98 89 58  
artweb design fax: +49 (58 45) 98 89 57  
breite straße 65 www: [http://www.artweb-design.de](http://www.artweb-design.de)  
de-29468 bergen mail: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![patcito](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@patcito](https://www.ruby-forum.com/u/patcito)\
**Post date:** [April 13, 2007, 7:21pm UTC](https://www.ruby-forum.com/t/globalize-newbie/72098/5 "2007-04-13T19:21:44Z")

</div>

Thanks for the answer! I had already reached that point!

Yes, my database is working with the proper table and translations, and  
I’ve checked it with the script/console, etc…  
But my problem is that when I write in my view something like \<%=  
“Name”.t%\>, to get the proper string “name” in the language I specify  
before… (and is stored in my data base, of course, in the translations  
table).  
But… WHERE and WHEN have I specified the language? (Locale.set(“en-Us”)  
for example)???  
Could someone clarify my doubts…? What am I missing in the process?

Thanks a lot,

Monica
