Rails 2.2 の国際化

Controller

flash[:notice] = I18n.t(
  :updated_success,
  :default => '{{model}} was successfully updated.',
  :model   => Blog.human_name,
  :scope   => [:railties, :scaffold] )
I18n.t 'date.formats.short'
I18n.t 'short', :scope => 'date.formats'

View

<%= t(
  :editing,
  :default => "Editing {{model}}",
  :model   => Blog.human_name,
  :scope   => [:railties, :scaffold] )
%>
<%=l article.created_at, :format => :short %>

gem install

gem install amatsuda-i18n_generators --remote
$ script/generate i18n ja
$ script/generate i18n_locale ja
$ script/generate i18n_translation ja            # rake db:migrateしたあと
$ script/generate i18n_scaffold blog name:string