[Radiant] Suggestions on where to set the locale
Mohit Sindhwani
tech at onghu.com
Tue Apr 1 11:45:51 CDT 2008
Svoop wrote:
> Hello
>
> I'm not sure where to set the locale without touching the Radiant core. My
> multilingual website uses the language_redirect extension and URLs that
> begin with /en, /de etc. Many things can be done with if_url, but i.e. date
> months are translated based on the locale.
>
> Setting the locale by Apache could be a way, but it won't work with the
> mongrel_cluster - and mod_rails is not yet released.
>
> Anyone with an inspiring idea out there?
>
This is what I have marked in another thread - does it help?
Cheers
Mohit
I found the details regarding setting the timezone in
> app/models/radiant/config.rb which pointed me to
> http://api.rubyonrails.org/classes/TimeZone.html for details on TimeZone
> specification in Rails. For my installation I did:
>
> $ ./script/console production
>> > >> Radiant::Config["local.timezone"] = "Pacific Time (US & Canada)"
>>
I've been finding lots of little gems in the mailing list. Like what
should have been obvious... A better place than the console for setting
configuration data is, duh... in config/environment.rb. At the bottom I
put:
require 'radiant/config'
Radiant::Config["local.timezone"] = "Pacific Time (US & Canada)"
More information about the Radiant
mailing list