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
setting.
Does gettext support that caching mechanism?
Does anyone have some experience about this, thanks.
Hi,
The newest Ruby-GetText-1.10.0 support Action/Fragment caching.
class ArticlesController < ApplicationController
caches_action :show # Action cache
:
def show
:
:
end
def create
@article = Article.new(params[:article])
if @article.save
expire_fragment(:action => “list”) # Clear Flagment cache
expire_action(:action => “show”) # Clear Action cache.
:
:
end
end
app/views/articles/list.rhtml
Listing articles
<% cache do %> #Flagment cache.
Fragment cache
<% end %>
HTH,
On Sun, 8 Jul 2007 03:59:09 +0800
“Ye Dingding” [email protected] wrote:
Does gettext support that caching mechanism?
–
.:% Masao M.[email protected]