mantisbt:localizing_custom_fields_labels
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
mantisbt:localizing_custom_fields_labels [2011/11/16 07:32] – The page rendering was broken (maybe since new PHP version on mantisbt.org). Added new line to fix it at end of file. atrol | 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.txt · Last modified: 2019/01/14 06:02 by dregad