"Did you say that to her?"
Translation:An ndúirt tú é sin léi?
Isn't "did" translated as "ar"? Why is it "an" in this case?
Because Irish doesn't use the same prepositions that English does. As with éist, you use le with abair (dúirt is the past tense form of abair). Here are some of the examples in the FGB entry for abair on teanglann.ie that show how le is used where you would use "to" in English:
"Abair leis féin é - "say it to himself"
Deir lucht staire linn - "historians inform us"
Cad a déarfá le deoch? -"What would you say to a drink?"
Dúirt mé liom féin gurbh fhearr dom fanacht sa bhaile - "I said to myself that it would be better for me to stay at home"
Deirimse mairteoil leat! - "That’s what I call beef!"
Abair leat - "continue your story"; "say what you have to say"
Abair leis fanacht liom - "tell him to wait for me"
Mar a bheadh Dia á rá leis - "as if God ordained it" ("as if God was saying it to him")
Déarfaidh mé thú le d’athair - "I’ll report you to your father"
An bhfuil aon fhocal agat le rá liom? - "Have you anything to say to me?
There is one example that uses do, but it is in the sense of "for", rather than "to":
Abair an dán sin dúinn - "recite that poem for us"
The same goes for the interrogative particle an before verbs that start with d, and that are eclipsed with n.
On the other hand, you normally get eclipsis after ag an and ar an and some other simple prepositions, but in this case d and t are indeed exceptions - so you get ar an díon rather than ar an ndíon. (Munster Irish uses ar an ndíon and Ulster Irish uses ar an dhíon)