| 2月 10th, 2009

Rails2.2.2 で簡単に多言語化(ていっても日本語しかお世話にならなそうだけど)出来てすごい!

% sudo gem so -a http://gems.github.com
% sudo gem i amatsuda-i18n_generators
% ./script/generate i18n ja
% vi config/locales/active_record_ja.yml

すると、なかにごにょごにょ

ja:
  activerecord:
    models:
      user: 'ユーザ'
    attributes:
      user:
        name: '名前'
        email: 'メールアドレス'
....

みたいな感じで書くと、ARのエラーとか日本語されてる。お手軽ぽ。

There are no comments yet, add one below.

Comments are closed.

Leave a Comment


download the hurt locker  
UA-682965-1