In non-Vue files, you can simply do the following:
import { useToast } from 'primevue/usetoast';
const toast = useToast();
toast.add({
severity: 'error',
summary: this.t('errorCodes.E99.titleError'),
detail: this.t('errorCodes.E99.bodyError'),
});