I feel for you , I wish I could help , I reckon its best that you explain yourself to the magistrate , you got into an argument , they were ranting and shouting at you in a strange language then they surrounded you , next thing a person grabbed you , you felt you were being attacked and lashed out , seeing it was a policeman you immediately apologized for this but was frightened for your safety after a gang were ranting and you felt for your own safety .
best of luck with this , Its easy for me to say don't worry , its hardly the crime of the century , put it into context , if you are of good character and get this point across then don't worry , the worse they can do is slap your wrist and give you a small fine ... let us know how it turns out please.....