Yii Framework Forum: Use I18N From A Module In Cmenu - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Use I18N From A Module In Cmenu Rate Topic: -----

#1 User is offline   Robert_rand(-∞...+∞) 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 26-November 12

Posted 18 October 2013 - 09:36 AM

Hi,

i have a module search in /protected/modules/search an some of its i18n strings in /protected/modules/search/LANGUAGE/menu.php.

Now when i try to access a messages file of the module using the CMenu widget in /protected/views/layouts/main.php with
this->widget(
    'zii.widgets.CMenu',
    array(
        'items' => array(
            array(
                'label' => 'Home',
                'url' => array(
                    '/site/index'
                )
            ),
            array(
                'label' => CHtml::encode(Yii::t('SearchModule.menu', 'search')),
		'url' => array(
                    '/?r=search'
		)
	    )
        )
    )
);

i got the PHP warning "include(SearchModule.php): failed to open stream: No such file or directory".

How can i access the message strings of a module outside of itself?

Thanks,
Robert
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users