Could someone help me where to define to translations of the custom field titles?
Thanks,
Illes
Translations for custom fields
Moderators: Developer, Contributor
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
- 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
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
Thanks,
Illes
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
Regards,
Victor
MantisConnect
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
Re: Translations for custom fields
Is it also possible to specify the translation for enumeration values in this way?
Re: Translations for custom fields
This is how it works for enums https://www.mantisbt.org/docs/master/en ... mize.enums
Re: Translations for custom fields
Thanks for quick help.
So, for example, if I have a custom field named "approval_state", I should create two strings for each language:
Is it the way it works for custom enums?
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";
Re: Translations for custom fields
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
Translation of custom field enumeration values is not possible because of https://www.mantisbt.org/bugs/view.php?id=5636