Page 1 of 1
Translations for custom fields
Posted: 11 Apr 2005, 14:25
by illes
Could someone help me where to define to translations of the custom field titles?
Thanks,
Illes
Posted: 12 Apr 2005, 07:40
by vboctor
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
Thanks for your help, but
Posted: 12 Apr 2005, 09:48
by illes
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
Posted: 12 Apr 2005, 11:24
by vboctor
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
Posted: 12 Apr 2005, 13:17
by illes
Thanks a lot, now it's clear.
Posted: 22 Apr 2005, 11:08
by vboctor
Re: Translations for custom fields
Posted: 29 Oct 2018, 07:35
by sergeyol
Is it also possible to specify the translation for enumeration values in this way?
Re: Translations for custom fields
Posted: 29 Oct 2018, 09:21
by atrol
Re: Translations for custom fields
Posted: 29 Oct 2018, 21:58
by sergeyol
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?
Re: Translations for custom fields
Posted: 29 Oct 2018, 22:16
by atrol
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