Just to explain the long way thinks are done;
- First, find the string that has to be translated in the lang file. i.e. “Nature of Third Party” corresponds to “NatureOfThirdParty”
- In the “list.php” find the field that corresponds to the string. I.e. for “NatureOfThirdParty” the field is “customerorsupplier”
- In the same file, search for the field name i.e. “customerorsupplier”. You can encounter multiples definitions and usually, the last one is that displays the field. In this case:
// Type
if (!empty($arrayfields['customerorsupplier']['checked'])) {
print '<td class="center">';
print $companystatic->getTypeUrl(1);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
And we have the function that shows the field i.e. “$companystatic->getTypeUrl(1);”
What is left to do is open the “.class.php" file in the "/class” folder. As we are already in “societe” as main folder, that means we need to open “/societe/class/societe.class.php” and search for “public function getTypeUrl(” (note that I use just one bracket, as there are or can be arguments to the function, and if we use getTypeUrl() we may find nothing).
And as result: here we are. All the options to output the fields. We have to edit the part Between “> something here ” as this is what we see on the browser.
For example, if we change '.dol_substr($langs->trans("Prospect"), 0, 1).'
to '.dol_substr($langs->trans("Prospect"), 0, 4).'
instead of “P” we will see “Pros”, and if we change it to just '.$langs->trans("Prospect").'
we will see the full word “Prospect” translated to the current language.
And if you want a completely different letter or word, instead of all the above just replace '.dol_substr($langs->trans("Prospect"), 0, 1).'
with whatever you want.
IMPORTANT NOTE: Any manual change to the core Dolibarr files that is done directly, instead of using a module, will be lost upon version upgrade