Zeka Posted April 29, 2019 Share Posted April 29, 2019 Hi. I'm trying to translate the title and nav items for my custom process module from ProcessName.info.php $info = array( 'page' => array( 'name' => 'authors', 'parent' => '', 'title' => __('Authors') ), 'nav' => array( array( 'url' => 'add/', 'label' => __('Add'), 'icon' => 'plus', ), array( 'url' => './', 'label' => __('Manage'), 'icon' => 'list', ), array( 'url' => 'trash/', 'label' => __('Trash'), 'icon' => 'trash-o', ), ) ); But it doesn't work nor for the title, neither for nav items. If I use getModuleInfo method that is placed inside ProcessName.module.php I was able to get translations for nav items, but not for the title public static function getModuleInfo() { 'page' => array( 'name' => 'authors', 'parent' => '', 'title' => __('Authors') ), 'nav' => array( array( 'url' => 'add/', 'label' => __('Add'), 'icon' => 'plus', ), array( 'url' => './', 'label' => __('Manage'), 'icon' => 'list', ), array( 'url' => 'trash/', 'label' => __('Trash'), 'icon' => 'trash-o', ), ) ) } I'm was digging in AdminThemeFramework.php and has found how it works for default admin pages, but can't understand how I can get it to work with custom module/pages. Thanks in advance. Eugene. Link to comment Share on other sites More sharing options...
Gadgetto Posted August 16, 2019 Share Posted August 16, 2019 I have the same problem. Tried to make strings translatable in module.info.php, but I get an error "__" is not a function. Do you mean "___" ... Link to comment Share on other sites More sharing options...
OLSA Posted October 17, 2019 Share Posted October 17, 2019 Hello, old topic, but maybe you can try another syntax using $this->_('....') Or from @Zeka example: 'page' => array( 'name' => 'authors', 'parent' => '', 'title' => $this->_('Authors') ), Regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now