Change language for custom fields
Moderators: Developer, Contributor
Change language for custom fields
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
I would like my custom fields to change language when the user do. I can't find that this is possible, is it?
/A
Checkout the following thread:
http://forums.mantisbt.org/viewtopic.php?t=205
Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
http://forums.mantisbt.org/viewtopic.php?t=205
Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
don't understand
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
Thanks /A
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
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?
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
$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
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
English: $s_start_date = "Start Date";
German: $s_start_date = "xxx";
Italian: $s_start_date = "yyy";
Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect
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
Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
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
http://www.futureware.biz/blog/index.ph ... &tb=1&pb=1
Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
For categories?
Is there some way to change language for categories?
Hopeful.../Ann
Hopeful.../Ann
At the moment the categories can not be localised.
Regards,
Victor
Mantis to Go?
http://www.futureware.biz/mantisconnect
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
I have ver. 1.1.orc2 it's possible change language categories?
Re: Change language for custom fields
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