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.
Dc218395c242f9feb76c62aea1183874?d=identicon&s=25 helzer (Guest)
on 2007-03-19 17: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
391f9b787cdc12aa2c179713f5103e3a?d=identicon&s=25 Ilan Berci (iberci)
on 2007-03-19 17: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$
5233478c51a92b6a1a5c970cbf3a42f3?d=identicon&s=25 Isak Hansen (Guest)
on 2007-03-19 20:58
(Received via mailing list)
On 3/19/07, helzer <amir.helzer@gmail.com> 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
Dc218395c242f9feb76c62aea1183874?d=identicon&s=25 helzer (Guest)
on 2007-03-19 22: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.