How to cache page using gettext?

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.


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 %>