[Radiant] Suggestions on where to set the locale
Oli Studholme
radiantcms.org at boblet.net
Fri May 2 01:00:28 CDT 2008
Hi All,
On Apr 2, 2008, at 1:45 AM, Mohit Sindhwani wrote:
>>> > >> 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)"
I'd like a localized <r:date /> output for a bilingual English/
Japanese website eg 2nd March 2008 on an English page but 2008年5
月2日 on a Japanese page. This would typically be done via
locale, but I think Mohit's config option will change the date
formatting for every instance. Does anyone know how I'd achieve this,
say based on a lang page part or url regexp match? Would I need to
make a custom date tag that accepts locale as an attribute somehow?
Thanks in advance.
peace - oli
More information about the Radiant
mailing list