Change language for custom fields

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
sunq
Posts: 14
Joined: 12 Apr 2005, 06:19

Change language for custom fields

Post by sunq »

Hi,
I would like my custom fields to change language when the user do. I can't find that this is possible, is it?

/A
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

Checkout the following thread:
http://forums.mantisbt.org/viewtopic.php?t=205

Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
sunq
Posts: 14
Joined: 12 Apr 2005, 06:19

don't understand

Post by sunq »

Thanks for the help but I don't think I understand. Could you give a short example what I shall do when I have a custom field?

Thanks /A
hinke
Posts: 23
Joined: 15 Feb 2005, 08:35
Location: Lund, Sweden
Contact:

Post by hinke »

You define a file called custom_strings_inc.php and put that into the root folder of Mantis.

Then you can define your custom text like this:

<?php

if ( lang_get_current() == 'swedish' ) {
$s_rejected_bug_title = 'Avvisa ärende';
} else {
# English
$s_rejected_bug_title = 'Reject issue';
}

?>

I hope that helps.

-Henrik
sunq
Posts: 14
Joined: 12 Apr 2005, 06:19

But how?

Post by sunq »

Yes I think I got that part but how do I get my custom field named "Start date" to "understand" that it should pick its translation from
$s_start_date='Start datum' in custom_strings_inc.php?? Can't understand that connection...

Henrik gissar att du är svensk så om du har en förklaring får du gärna ta den på svenska :)

/ann
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

Rename the custom field to "start_date", then have it localised as follows:

English: $s_start_date = "Start Date";
German: $s_start_date = "xxx";
Italian: $s_start_date = "yyy";

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect
sunq
Posts: 14
Joined: 12 Apr 2005, 06:19

Thanks!!

Post by sunq »

Yes it works now thanks a lot!!
/ann
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

By the way, $s_start_date is probably going to be used by Mantis original strings, so you can benefit from the already existing translation. If that is not what you want, then change the name to "custom_start_date" or "my_start_date" or whatever you like.

Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

I have added a post to my blog that summarises this thread:
http://www.futureware.biz/blog/index.ph ... &tb=1&pb=1

Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
sunq
Posts: 14
Joined: 12 Apr 2005, 06:19

For categories?

Post by sunq »

Is there some way to change language for categories?

Hopeful.../Ann
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

At the moment the categories can not be localised.

Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
jiriksykora
Posts: 3
Joined: 15 Feb 2008, 12:41

Re: Change language for custom fields

Post by jiriksykora »

I have ver. 1.1.orc2 it's possible change language categories?
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Change language for custom fields

Post by vboctor »

Categories are still not localizable. Please submit a feature request in the bug tracker (or add a note to support an existing issue).
Migrate your MantisBT to the MantisHub Cloud
Post Reply