Germany: There's a paragraph saying you can change your name and gender marker if you're a permanent resident and if the country you're from does not have similar regulations. However, changing your name and gender marker takes around 6-12 months and you need reports from two therapists. Total costs are around 1500 Euros.