Contact Title Customer not translated based on language customer but based on language user

Hi,

I’m using Dolibarr v17.02 my default user language is Dutch.

I edit the default German (de_DE) email template for sending my proposals(quote). In this email template I have placed the substitution variable CONTACT_TITLE_CUSTOMER. Assuming that the variable in this email would be automatically translated to the default language of the customer (in this case to de_DE). so it would print the German contact title “Frau”.

But I noticed that this variable is not printed based on the language settings of the customer, but it’s printed based on the language settings of the user?!?!

So in this case the variable is not translated to German “Frau”. Instead it shows the Dutch word “Mevrouw”. (Becasue I’m logged in as a user with language set to dutch)
If I log in as a user that has the default language set to English this variable is translate to English and shows “Mrs.”.
If I log in as a user that has the default language set to German the variable is translate to German and shows “Frau”.

By the way all of the text in the generated PDF of the proposal is translate correct to German. So for creating the PDF the code is using the language settings of the customer (as it suppose to be), but for creating the email the code is using the language setting of the logged in user.

Clearly this is miss coded.
I don’t know if it is solved in a higher/newer version of Dolibarr?
Anybody with version higher than v17.02 who can check?
Thanks!

Is this a simple adjustment in the code?

Hope someone can help.
thanks.