Zend_Dojo_Form like drop-down calendar of DateTextBox etc.
My steps are:
1) In the layout script:
$this->dojo()->setDjConfigOption('extraLocale', 'fr-fr')
->requireModule('dojo.i18n');
Nothing happened. The calendar's month name and week names are in English still;
2) Add 'locale' to the form element declaration:
$this->addElement(
'DateTextBox',
'foo',
array(
'decorators' => $this->elementDecorators,
'label' => 'Date',
'required' => true,
'invalidMessage' => 'Invalid date specified.',
'formatLength' => 'long',
'locale' => 'fr-fr'
)
);
Nothing is changed still. The calendar's locale is en_US still.
Also, in the Dojo Internationalization manual written that Dojo has
dojo.requireLocalization() which is used to declare usage of I18N
resources and load them. I haven't found a corresponding method in
Zend_Dojo package.
没有评论:
发表评论