Zogaj apologised for his behaviour, with his lawyer saying the defendant is a very emotional man who did not mean what he said to the principal.
Solicitor Kevin Tunney said Zogaj, who is originally from Kosovo, had picked up the phrase "I'll kill you" since he came to Ireland 13 years ago, and it was something he heard people say all the time.
The case was before the court for sentencing after a judge ordered a probation report.
The defendant had previously admitted before Tallaght District Court to making threats to kill or cause serious harm to a school principal.
Garda Stephen Murray said he was called to St Bridget's Junior National School in Tallaght on May 28 last.
He said Zogaj told the principal "I've had a hard life, if you make my life hard, I will make your life harder".
The garda said the principal was visibly upset and shaken.
He added he called to Zogaj's house to speak to him but he became aggressive towards him, telling him to "f**k off" and get off his property.
Mr Tunney said Zogaj is married with four children and has never been in trouble before.
He said the defendant was very distressed about his behaviour, he did not mean what he said and he had no intention of killing anyone.
Mr Tunney said Zogaj has had a hard life but that he had been totally honest with the probation services.
Judge Anthony Halpin ordered Zogaj to enter into a 12- month probation supervision bond.