Jump to content
Zeka

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

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.

Share this post


Link to post
Share on other sites

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 "___" ...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...