I want to answer my own question, so somebody might use it. I use usort and strcmp.
$categories_db = $this->em->getRepository('FrontendContentBundle:CategoriesAllocation')
->findBy(array('state' => $state_id,
'module' => $module_id
));
usort($categories_db, function($a, $b) {
return strcmp($this->translator->trans($a->getCategory()->getCategory(), array(), 'categories'), $this->translator->trans($b->getCategory()->getCategory(), array(), 'categories'));
});