Facing Language issue in shopware 6 latest version

initially, I am installing the shopware shop with the default language in English, and after I am changing the domain locale and snippet set to Deutsch and de_DE. So for frontend snippets loaded in Deutsch correctly.

But for some restrictions, I am throwing errors from the subscriber file still the error message comes in the English language. And this issue not comes in shopware version 6.3 series. If any changes in system locale set in the latest version

Here is the sample code i am using „$flashBag->add(‚danger‘, $this->translator->trans(‚error-text‘));“