mantisbt:localizing_custom_fields_labels
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mantisbt:localizing_custom_fields_labels [2008/10/29 04:25] – (old revision restored) 127.0.0.1 | mantisbt:localizing_custom_fields_labels [2019/01/14 06:02] (current) – This is documented in Admin Guide dregad | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Localizing Custom Fields Labels ====== | ====== Localizing Custom Fields Labels ====== | ||
| - | Following is the recipe for customizing the labels for custom fields. | + | Please refer to [[https://mantisbt.org/ |
| - | + | ||
| - | * Give the custom field a valid variable name | + | |
| - | For example, for a start date custom field, name it " | + | |
| - | + | ||
| - | * Localize the word " | + | |
| - | Mantis provides a technique | + | |
| - | + | ||
| - | The way to do that is to create custom_strings_inc.php and place it in the main folder of Mantis. The implementation of this file should look similar to the following: | + | |
| - | + | ||
| - | <code php> | + | |
| - | if ( lang_get_current() == ' | + | |
| - | $s_my_start_date = 'Start Date XX'; | + | |
| - | } else { | + | |
| - | | + | |
| - | $s_my_start_date = 'Start Date'; | + | |
| - | } | + | |
| - | </ | + | |
| - | + | ||
| - | Note that the above code must be inside a PHP block. | + | |
| - | + | ||
| - | If the $s_my_start_date happened to be a stock string in Mantis that is already localised | + | |
mantisbt/localizing_custom_fields_labels.1225268722.txt.gz · Last modified: (external edit)
