# ActiveScaffold (or whatever) and Globalize

**URL:** <https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363>\
**Category:** Rails\
**Created:** [September 24, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363 "2007-09-24T14:18:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 24, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/1 "2007-09-24T14:18:00Z")

</div>

Hi guys!

This is my first message to this list. I’m fairly new to the whole rails  
scene, though I’m a seasoned MVC developer.

There are two things that made me fall in love with rails so far:  
Migrations, and Globalize.

I wonder if anyone knows about using some activescaffold-esque way of  
editing multilingual content. I’ve seen something about using globalize  
to translate activescaffold itself, but I’d like to make it work the  
other way around, and edit some DB contents in all the languages I’d  
like to make available.

I know, I can always code it myself, as I have done before in python. I  
know I can’t expect any plugin to work with all the rest out of the box.  
That would be insane. But maybe there’s some easy option to make them  
play together.

~ Chris

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 24, 2007, 2:27pm UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/2 "2007-09-24T14:27:03Z")

</div>

Hi Chris

How about checking out activescaffoldlocalize by Ed Moss, one of the  
developers of AS ?

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 24, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/3 "2007-09-24T16:10:35Z")

</div>

Hi, you can use globalize rails plugin, with AS, i used it now, but you  
must know that there is a bug with caching translations(easily can be  
fixed with patch, patch you can get from forum on globalize web site).

my opinion - globalize is easy to use and powerful plugin to translate  
pages, BUT i don’t know is it faster compare to gettext,…

also you should check globalize tutorial on their website!

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 25, 2007, 9:04am UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/4 "2007-09-25T09:04:25Z")

</div>

> IMHO, Globalize uses the database as translation “repository”, and this  
> is contrained to it’s speed. Gettext _is_ very fast AFAIK. For django, I  
> used gettext to translate trivial UI strings, and a hacky database field  
> naming convention for data translations. This never worked quite well,  
> and django-multilingual never quite convinced me (though I know it’s  
> fairly stable and usable in production).

But after you open translation page first time, all translation cached  
in memory, so next time when you open page it doesn’t make any SQL query  
to database.  
Another big advantage of globalize - is web interface to translate words  
and phrases.  
Really i don’t try gettext professionally, because i get problem with  
adding new languages that doesn’t comes with gettext package. thats why  
i choose globalize

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 25, 2007, 11:00am UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/5 "2007-09-25T11:00:37Z")

</div>

> Really i don’t try gettext professionally, because i get problem with  
> adding new languages that doesn’t comes with gettext package. thats why  
> i choose globalize

What do you mean by “doesn’t comes with gettext package”? IMHO, gettext  
is just a library to extract text from certain files. You could just as  
well use

body\_text = translations[lang][‘body\_text’]

You get the point.

It seems like I’ve drifted off topic a bit 😃

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 24, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/6 "2007-09-24T18:28:51Z")

</div>

> my opinion - globalize is easy to use and powerful plugin to translate  
> pages, BUT i don’t know is it faster compare to gettext,…

IMHO, Globalize uses the database as translation “repository”, and this  
is contrained to it’s speed. Gettext _is_ very fast AFAIK. For django, I  
used gettext to translate trivial UI strings, and a hacky database field  
naming convention for data translations. This never worked quite well,  
and django-multilingual never quite convinced me (though I know it’s  
fairly stable and usable in production).

Back to speed, I have a preference for PostgreSQL, for personal reasons,  
and it’s quite slow when connecting (due to some heavy auth system it  
uses) but pretty fast afterwards. So, if you manage to keep your queries  
together (I don’t really know how ActiveRecord behaves in this realm)  
it’s blazing fast and _very_ stable. And I like to trust my data  
backend 😉

I will never be faster than gettext, but with a proper setup it should  
make up for no real difference.

As for AS and Globalize, I’d ideally like to see AS automagically  
noticing the presence of Globalize data and behave accordingly in it’s  
views. Might this be a bit much of a dream? I’m still fairly new to  
ruby, but I might even try to get this out myself.

---

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [September 25, 2007, 2:07pm UTC](https://www.ruby-forum.com/t/activescaffold-or-whatever-and-globalize/115363/7 "2007-09-25T14:07:44Z")

</div>

> What do you mean by “doesn’t comes with gettext package”? IMHO, gettext  
> is just a library to extract text from certain files. You could just as  
> well use
> 
> body\_text = translations[lang][‘body\_text’]

I just make a folder with for new language(ukrainian), next i try to  
generate \*.po files, and it doesn’t generate it.
