Jump to content

How to translate module's process page title and nav items?


Zeka
 Share

Recommended Posts

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

  • 3 months later...
  • 2 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...