7.1. Strings / Translations
All strings used in MantisBT, including those defined in plugins, can be customized or translated differently. This is achieved by overriding them in the Custom Strings File (in config/custom_strings_inc.php), which is automatically detected and included by MantisBT code.
Defining custom strings here provides a simple upgrade path, and avoids having to re-do the changes when upgrading to the next release.
Two formats are supported within this file:
- New Format
Define a
$s_custom_messages array as follows:
$s_custom_messages = array( LANG => array( CODE => STRING, ... ) );
- Legacy Format
One variable per string
$s_CODE = STRING;
Mixing old and new formats within the file is not supported.
NEVER call lang_get_current() from the Custom Strings File, as doing so will reset the active_language, causing the code to return incorrect translations if the default language is different from English. Always use the $g_active_language global variable instead.