main menu custom options and translation...

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
cyril
Posts: 3
Joined: 20 Apr 2005, 13:38

main menu custom options and translation...

Post by cyril »

I firstly posted this topic in the customization forum but I guess here is a better place so, here's a copy & paste topic (sorry)

(sorry for my poor english...)

I use mantis 0.19.0
I added a custom menu option but can't success to translate the caption.

I tried to edit a "custom_strings_inc.php" file in the main directory but without success?

Is it the right way to do that?

in the config_inc.php file:

Code: Select all

    $g_main_menu_custom_options = array(  array( "My Link",  MANAGER, 'my_link.php' ) ,
  array( "My Link2", ADMINISTRATOR, 'my_link2.php' ));

in the custom_strings_inc.php file:

Code: Select all

<?php

    if ( lang_get_current() == 'french' ) {
        $s_my_link = 'Start Date XX';  // German translation of Start Date
    } else {
        # Default (use your preferred language as the default)
        $s_my_link = 'Start Date';
    }

?>

thanks a lot for any reply.[/code]
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

The definition should look like:

$g_main_menu_custom_options = array( array( "my_link", MANAGER, 'my_link.php' ) ,
array( "my_link2", ADMINISTRATOR, 'my_link2.php' ) );

The title string is translated before it is printed. There is a subtle bug here in that spaces are not allowed in the link label.
Guest

Post by Guest »

Thank you very much, it works!

i can add that labels are case sensitive...
cyril
Posts: 3
Joined: 20 Apr 2005, 13:38

Post by cyril »

Anonymous wrote:Thank you very much, it works!

i can add that labels are case sensitive...
i wasn't logged in...
jarus
Posts: 2
Joined: 23 Sep 2015, 14:15

main menu text change

Post by jarus »

Hello I am trying to change the main menu text like "Report Issue" to "New Project" how can i accomplish this?
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: main menu custom options and translation...

Post by atrol »

Create a file custom_strings_inc.php in the root directory of your Mantis installation with the following content

Code: Select all

<?php
$s_report_bug_link = 'New Project';
Please use Search before posting and read the Manual
jarus
Posts: 2
Joined: 23 Sep 2015, 14:15

Re: main menu custom options and translation...

Post by jarus »

@atrol : Thanx..
Post Reply