This is not really a bug report but more a feature request: There is a
language property in the CApplication that determines the current
application language. I think it would be great if that attribute would be
used to determine and set the default language of the date picker.
There are some problems as e.g. en_us is the default language, but there is
no en_us localization for the date picker. So first of all it seems instead
of zh_tw zh-TW is used. So instead of an underscore a hyphen is used and
the second part is uppercase. Then we should fall back to the locale
without the second part when the locale isn't present. If that doesn't
exist too, '' should be used (that's English). Now the question is if the
i18n js should always be loaded and the selection should be done in js or
if at least the default locale should be checked and then not to load the
i18n js when it isn't requested by a specific date picker or if e.g. the
i18n js file should be split into parts (which it probably was at first)
and do that check if the locale exists on the server side and just load the
i18n that's actually needed.
I'm quite new to yii/zii so I don't know what's preferred in yii/zii, but
if you could tell me what's your preferred option I could also provide a
patch to implement that behavior.
Original issue reported on code.google.com by Michi...@googlemail.com on 10 Jan 2010 at 12:46
Original issue reported on code.google.com by
Michi...@googlemail.com
on 10 Jan 2010 at 12:46