public function translate($language)
{
// Loop through the notifications
foreach ($this->items as $key => $item) {
try {
$translation = $this->translator()->translate($language, $this->items[$key]['body']['name']);
$this->items[$key]['body']['text'] = $translation;
} catch (NotificationTranslationNotFoundException $e) {
$this->items[$key]['body']['text'];
}
}
$this->parse();
return $this;
}