Gender-specific User attribute to specify salutation

Permalink
Hello community,

I am looking for some inspiration or idea for the following problem:

In most languages besides english, the article exists for both male and female, as well as the conjugation of the verbs.

So if I want to address a female person, it is:
English: Dear Lucy
Italian: Cara Lucy
German: Liebe Lucy

For male person it would be:
English: Dear Tom
Italian: Caro Tom
German: Lieber Tom

So besides inserting the Name based on a user attribute in - for example - a newsletter, it would be even better to be able to but in the correct letters based on gender and/or language.

So - how would I go do that? Clearly, create a select attribute to choose gender in the user registration / profile. But how can this be put out whenever called? Let's say I create the user attribute with the options "M" and "F", in english, this wouldn't change anything to the verb, in italian, "F" would add a "a", "M" would add a "o". Should this be wrapped in a t() function to work?

I am not a code guy so I am guessing around just based on what I've understood already but I think this would be a worthy function for many in the multilingual community.

Thanks for any hints!