Translations for custom fields

Get help from other users here.

Moderators: Contributor, Developer

Post Reply
illes
Posts: 30
Joined: Mar 09, 2005 3:37 am
Location: Budapest, Hungary

Translations for custom fields

Post by illes » Apr 11, 2005 9:25 am

Could someone help me where to define to translations of the custom field titles?

Thanks,
Illes

vboctor
Site Admin
Posts: 1286
Joined: Feb 13, 2005 5:11 pm
Location: Redmond, Washington
Contact:

Post by vboctor » Apr 12, 2005 2:40 am

When the titles for custom fields are shown, the following rule is used:
- If there is a string with the custom field name in the locatisation files, it will be used.
- Otherwise, the name will be used as the title.

Typically, custom field names will not be in the standard localisation files. Also we don't want to edit the distribution files to make the upgrade easier. The proper way to do this is to add these strings to custom_strings_inc.php.

An example of adding such custom strings can be found at http://manual.mantisbt.org/manual.custo ... values.php.

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect

illes
Posts: 30
Joined: Mar 09, 2005 3:37 am
Location: Budapest, Hungary

Thanks for your help, but

Post by illes » Apr 12, 2005 4:48 am

I was already aware that custom_strings_inc.php have to be used, but I would like to know the variable name of the custom fields (e.g. "Date/Time Found")!

Thanks,
Illes

vboctor
Site Admin
Posts: 1286
Joined: Feb 13, 2005 5:11 pm
Location: Redmond, Washington
Contact:

Post by vboctor » Apr 12, 2005 6:24 am

If you have a custom field with the name "Date/Time Found", you should rename it to "date_time_found", use the php variable "$s_date_time_found", and set this variable to "Date/Time Found" by default. You can override the value to a localised value for the languages that you want to support.

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect

illes
Posts: 30
Joined: Mar 09, 2005 3:37 am
Location: Budapest, Hungary

Post by illes » Apr 12, 2005 8:17 am

Thanks a lot, now it's clear.

vboctor
Site Admin
Posts: 1286
Joined: Feb 13, 2005 5:11 pm
Location: Redmond, Washington
Contact:

Post by vboctor » Apr 22, 2005 6:08 am

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

sergeyol
Posts: 4
Joined: Apr 12, 2018 4:51 am

Re: Translations for custom fields

Post by sergeyol » Oct 29, 2018 2:35 am

Is it also possible to specify the translation for enumeration values in this way?

atrol
Site Admin
Posts: 7515
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Translations for custom fields

Post by atrol » Oct 29, 2018 4:21 am

Please use Search before posting and read the Manual

sergeyol
Posts: 4
Joined: Apr 12, 2018 4:51 am

Re: Translations for custom fields

Post by sergeyol » Oct 29, 2018 4:58 pm

Thanks for quick help.

So, for example, if I have a custom field named "approval_state", I should create two strings for each language:

Code: Select all

$s_approval_state = "Approval State";
$s_approval_state_enum_string = "10:new,20:waiting for approval,30:approved";
Is it the way it works for custom enums?

atrol
Site Admin
Posts: 7515
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Translations for custom fields

Post by atrol » Oct 29, 2018 5:16 pm

Translation of enumeration values is possible.

Translation of custom field enumeration values is not possible because of https://www.mantisbt.org/bugs/view.php?id=5636
Please use Search before posting and read the Manual

Post Reply