Ruby-GetText Sample blog for Ruby on Rails and Ruby-GetText-Package.

Requirement
-----------
* ruby-1.8.2
* rails-0.13.0
* rake
* mysql

Installation
------------
1. Setup rails and mysql, Ruby-GetText-Package.
2. Create DB and a table
   * using db/mysql.sql.
     a) $ mysqladmin -u <root> create blog
     b) $ mysql -u <root> blog < db/mysql.sql
   * using db/postgresql.sql.
     a) $ su - postgres
     b) $ createdb blog
     c) $ psql blog < db/postgresql.sql
3. Edit config/database.xml
4. Create mofiles using rake.
   $ rake makemo

5. (One click ruby installer for Windonws user only)
   On command prompt:

   > set PATH=c:\ruby\bin;%PATH%
   (If you have GTK+ and Ruby/GTK2)
   > set PATH=c:\gtk\bin;%PATH%

6. Then run the http server.
$ ruby script/server

Access the http server from WWW browser:

http://localhost:3000/blog


Files
-----

* Rakefile 
     - a Rakefile generated by rails.
       Add ":makemo" task which create mo files from po files.

* app/controllers/application.rb
     - Bind a textdomain to your application. 
       This is the most important file in this sample.

* app/controllers/blog_controller.rb
     - This is the main controller which localized.

* app/helpers/blog_helper.rb
     - a helper which localized.

* app/views/**/*.rhtml
     - Localized rhtml files. 

* vendor/lang_helper.rb
     - a "Vendor helper". It has its own textdomain.

* public/stylesheets/blog.css
     - a CSS file for this sample.

* po/* (blog.po[t]/lang_helper.po[t])
     - Catalog files which translators edit. They are convert to
       mofiles by "rake makemo".
       - blog.po[t] is for blog_controller and its views.
       - lang_helper.po[t] is for lang_helper.
 
* db/mysql.sql
    - a sql to create a database table for mysql.

* db/postgresql.sql
    - a sql to create a database table for postgresql.

* others
    - Generated by rails and I've not touched them.
