# Are GLoc or Globalize a good fit for this

**URL:** <https://www.ruby-forum.com/t/are-gloc-or-globalize-a-good-fit-for-this/62248>\
**Category:** Rails I18n\
**Created:** [June 1, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/are-gloc-or-globalize-a-good-fit-for-this/62248 "2006-06-01T21:04:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![n1c](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/3ec8ea/32.png) [@n1c](https://www.ruby-forum.com/u/n1c)\
**Post date:** [June 1, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/are-gloc-or-globalize-a-good-fit-for-this/62248/1 "2006-06-01T21:04:09Z")

</div>

We are building a site which offers different product mixes depending on  
where in the world you live, eg there are products applicable to the  
USA, Canada, Europe and Asia. So visitors to the site must choose their  
region when they arrive at the site.

Then we want to offer them choices of language, no matter what the  
region. So you could choose French even if you live in Japan, or  
Japanese even if you’re in the US.

My initial db schema simply has a resource table which stores multiple  
versions of all text from my product and other tables. So my product  
table would simply reference the resource table for the product name,  
for example. Language could be stored in a session variable or in the  
URL.

I don’t see any problems with this approach for the front-end stuff, but  
I’m worried that Rails may not be able to autogenerate all my back-end  
scaffolding.

Do either of GLoc or Globalize assist with what I’m doing? Could anyone  
share their experiences.

Thanks  
Nick.

---

<div class="post-metadata">

**Author:** ![n1c](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/3ec8ea/32.png) [@n1c](https://www.ruby-forum.com/u/n1c)\
**Post date:** [June 2, 2006, 10:20am UTC](https://www.ruby-forum.com/t/are-gloc-or-globalize-a-good-fit-for-this/62248/2 "2006-06-02T10:20:31Z")

</div>

> My initial db schema simply has a resource table which stores multiple  
> versions of all text from my product and other tables. So my product  
> table would simply reference the resource table for the product name,  
> for example. Language could be stored in a session variable or in the  
> URL.

Globalize has _one_ translation table. You’re handling the different  
languages by switching the locale. You have to specify which model  
attributes you want to have translated. The original models have the  
default language as an attribute. Didn’t play with fall-back scenarios  
(in case you don’t provide a translation), but I guess that the default  
language is used for that.

Since the translation all go into a generic attribute table (or however  
you call that) I’m not sure sure about performace impact. Don’t know if  
caching mechanism come into play.

Didn’t take a look at GLoc yet.

But since the authors of both projects reading this list, they can  
answer more precise.
