Changeset 1245

Show
Ignore:
Timestamp:
09/20/08 05:33:45 (4 months ago)
Author:
piyawat
Message:

use before_init_gettext to set locale according to

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/application.rb

    r1244 r1245  
    1515class ApplicationController < ActionController::Base 
    1616 
    17   #GetText.locale = $DEFAULT_LOCALE 
    18   #set_locale $DEFAULT_LOCALE 
    19   set_locale 'th_TH' 
     17  before_init_gettext :default_locale 
     18  def default_locale 
     19    if $DEFAULT_LOCALE 
     20      set_locale $DEFAULT_LOCALE 
     21    else 
     22      set_locale 'en_US' 
     23    end 
     24  end 
    2025  init_gettext "kv" 
    2126