error of loader.js if I use the suggested method call.
What are the steps to setup I18N for Zend_Dojo for instance fr_FR
locale for DateTextBox's drop-down calendar? Did I miss anything in my
steps or they should work?
On Fri, Jan 30, 2009 at 7:55 PM, Matthew Weier O'Phinney
<matthew@zend.com> wrote:
> -- Kostyantyn Shakhov <kshakhov@gmail.com> wrote
> (on Friday, 30 January 2009, 05:33 PM +0200):
>> I'm trying to setup I18N for Zend_Dojo namely for elements of
>> 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.
>
> You should be able to add that line using the addJavascript() method:
>
> $view->dojo()->addJavascript('dojo.requireLocalization();');
>
>
> --
> Matthew Weier O'Phinney
> Software Architect | matthew@zend.com
> Zend Framework | http://framework.zend.com/
>
没有评论:
发表评论