Forum: Ruby on Rails How to cache page using gettext?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
83c8cca11558f32207645ca270ae8475?d=identicon&s=25 Ye Dingding (Guest)
on 2007-07-04 20:04
(Received via mailing list)
I use gettext to translate my application. But when i want to do
caching, i
met the problem?

How can i cache the page under different language, such as english,
chinese.  Then it will auto-load the related html file depend on user's

Does gettext support that caching mechanism?
83c8cca11558f32207645ca270ae8475?d=identicon&s=25 Ye Dingding (Guest)
on 2007-07-07 22:00
(Received via mailing list)
Does anyone have some experience about this, thanks.
9fe908f5593444a40be14a424c372e58?d=identicon&s=25 Masao Mutoh (Guest)
on 2007-07-08 03:38
(Received via mailing list)

The newest Ruby-GetText-1.10.0 support Action/Fragment caching.

class ArticlesController < ApplicationController
  caches_action :show   # Action cache
  def show

  def create
    @article =[:article])
      expire_fragment(:action => "list")  # Clear Flagment cache
      expire_action(:action => "show")   # Clear Action cache.

# app/views/articles/list.rhtml
<h1>Listing articles</h1>
<% cache do %>                    #Flagment cache.
Fragment cache
<% end %>


On Sun, 8 Jul 2007 03:59:09 +0800
"Ye Dingding" <> wrote:

> >
> > Does gettext support that caching mechanism?

.:% Masao Mutoh<>
This topic is locked and can not be replied to.