How can I get the 'civilite' for a customer?

Could please someone tell me, how I can get the translated ‘civilite’ (salutation/title) like “Madame” or “Mister” or “Doktor” from a customer to use in postal address?

What php code-snippet do I have to use?

Is it for a third-party or for a contact. If you record the contact, so it should be written if you select the contact in the contact/adresses on the proposal/ order or invoice screen, and it should be displayed on a pdf.

EDIT: sorry i misunderstood the question : it should be somewhere in the langs.php file, no ?

Or go directly in the DB looking for the table llx_civilite or smthg like this :wink:

Sorry for my unclear question:

You will find the snippet in the pdf_crabe.modules.php for a invoice:

In the green case, I would like to see something like this as result:
Mister Flash Gordron
Somestreetname
1234 Planet City

Actually, I only get the FirstName and LastName but without the title/salutation/civilite.

How do I have to adjust the php code the get the red marked part for single private person (not a company nor a contact of a company).

I found it in $object->contact->civilite_id

Now I use it with code lines like this: if ($object->contact->civilite_id) $MyTitle=$langs->transnoentities("Civility".$object->contact->civilite_id); ... $pdf->MultiCell(100, 4, $MyTitle, 0, 'L');

well done, i was about to answer long time ago but with an error :
$object->client->civilite… but it didn’t work for me, so i didn’t answer.
Thanks for your tip, and sry for my non-answer :wink:
Regards,

Please note that from version 3.6.x the field ‘civilite_id’ changed its name!
Actually, you have to use:

$object->contact->civility_id
From the changelog: