Translation:After I broke my right leg, I needed an operation.
English tolerates many propositions behaving as conjunctions. Esperanto doesn't, and so you need to use an appropriate relative conjunction with it. In this case, it's 'kiam'.
Esperanto isn't alone in this. If anything, it's English that's odd in allowing prepositions to be uses as relative conjunctions.
Mi rimarkas ke la sono de ro sxangxas en Esperanto tiel kiel en cxi tiu ekzemplo. Sometimes it sounds like an Spanish or Russian "rr", sometimes like soft "r" like in Italian or in Spanish. I have already heard Esperantistoj saying that r as it sounds in English or in French, depending on their first language. I like this phonetic diversity in Esperanto!