Globalize newbie

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.
:frowning:
Any idea?

thanx in advance

Pat

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

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

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

The answer is that there are many answers :slight_smile:

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>

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>

Hope this helps to get you started.

Am 13.04.2007 um 12:48 schrieb Monica Saiz:


Posted via http://www.ruby-forum.com/.


Railsi18n-discussion mailing list
[email protected]
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
de-29468 bergen mail: [email protected]

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