how to override CalendarDatePicker language?

2 views
Skip to first unread message

Max Ischenko

unread,
May 12, 2006, 1:23:52 AM5/12/06
to turbo...@googlegroups.com
Hi,

I'm using CalendarDatePicker which uses LocalizableJSLink to select appropriate language to display calendar in.

Is it possible to override this choice somehow? Passing custom calendar_lang doesn't work, it still uses value from Accept-Language header.

Michele Cella

unread,
May 12, 2006, 5:25:46 AM5/12/06
to TurboGears

ATM you can't do that, but you can subclass and define a different
javascript.

What I suggest to do is this.

if calendar_lang is None:
use the LocalizableJSLink (the last link should point to en that we
know is a good existing fall-back)
else:
use a normal JSLink that uses calendar_lang

I think this is the most intuitive way, when you define calendar_lang
you want it to be the calendar lang, no matter what the Accept-Language
is.

Ciao
Michele

Reply all
Reply to author
Forward
0 new messages