Forum: Ruby on Rails How to render language dependent .rhtml templates?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
helzer (Guest)
on 2007-03-19 18:41
(Received via mailing list)
I want to localize my website, and do so with minimal server load
increase. Most of the texts comes from .rhtml templates, so I figure,
if the application rendered .rhtml pages per language, it would be
more efficient than going through a database / gettext calls for every
sentence.

Any idea on how I can do that on a global site basis?

Of course, dynamically generated text will have to go through gettext
or other string replacement system.

Thanks,
Amir
Ilan B. (Guest)
on 2007-03-19 18:56
helzer wrote:
> I want to localize my website, and do so with minimal server load
> increase. Most of the texts comes from .rhtml templates, so I figure,
> if the application rendered .rhtml pages per language, it would be
> more efficient than going through a database / gettext calls for every
> sentence.
>
> Any idea on how I can do that on a global site basis?
>
> Of course, dynamically generated text will have to go through gettext
> or other string replacement system.
>
> Thanks,
> Amir

ilans-mac:~ ilan$ gem list -r | grep localization
localization_generator (1.0.8, 1.0.7, 1.0.6, 1.0.5, 1.0.4, 1.0.3, 1.0.2,
1.0.1, 1.0.0)
    Ruby application internationalization and localization library
ilans-mac:~ ilan$
Isak H. (Guest)
on 2007-03-19 21:58
(Received via mailing list)
On 3/19/07, helzer <removed_email_address@domain.invalid> wrote:
>
> I want to localize my website, and do so with minimal server load
> increase. Most of the texts comes from .rhtml templates, so I figure,
> if the application rendered .rhtml pages per language, it would be
> more efficient than going through a database / gettext calls for every
> sentence.
>

See
<http://www.yotabanana.com/hiki/ruby-gettext-howto-....


Isak
helzer (Guest)
on 2007-03-19 23:34
(Received via mailing list)
Hi Isak,

That's called hitting the nail on the head! Exactly what I was looking
for.

Thanks,
Amir
This topic is locked and can not be replied to.