Page 1 of 1

Change language for custom fields

Posted: 21 Apr 2005, 13:12
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

Posted: 21 Apr 2005, 14:02
by vboctor
Checkout the following thread:
http://forums.mantisbt.org/viewtopic.php?t=205

Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect

don't understand

Posted: 21 Apr 2005, 14:46
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

Posted: 22 Apr 2005, 06:23
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

But how?

Posted: 22 Apr 2005, 10:42
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

Posted: 22 Apr 2005, 10:46
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

Thanks!!

Posted: 22 Apr 2005, 10:55
by sunq
Yes it works now thanks a lot!!
/ann

Posted: 22 Apr 2005, 10:58
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

Posted: 22 Apr 2005, 11:07
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

For categories?

Posted: 22 Apr 2005, 14:26
by sunq
Is there some way to change language for categories?

Hopeful.../Ann

Posted: 22 Apr 2005, 14:32
by vboctor
At the moment the categories can not be localised.

Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect

Re: Change language for custom fields

Posted: 18 Feb 2008, 14:15
by jiriksykora
I have ver. 1.1.orc2 it's possible change language categories?

Re: Change language for custom fields

Posted: 19 Feb 2008, 09:00
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).