public function translate(string $locale, string $key, array $args = []): string
    {
        if (isset($this->localeTranslationProviders[$locale])) {
            if (null !== $translation = $this->localeTranslationProviders[$locale]->translate($key, $args)) {
                $this->logger->info('translation: translate {locale} {key}', ['locale' => $locale, 'key' => $key]);

                return $translation;
            }

            $this->logger->notice('translation: missing {locale} {key}', ['locale' => $locale, 'key' => $key]);

            return $key;
        }

        $this->logger->warning('translation: missing {locale}', ['locale' => $locale]);

        return $key;
    }
public function translate(string $locale, string $key, array $args = []): string
    {
        if (isset($this->localeTranslationProviders[$locale])) {
            if (null !== $translation = $this->localeTranslationProviders[$locale]->translate($key, $args)) {
                $this->logger->info('translation: translate {locale} {key}', ['locale' => $locale, 'key' => $key]);

                return $translation;
            }

            $this->logger->notice('translation: missing {locale} {key}', ['locale' => $locale, 'key' => $key]);

            return $key;
        }

        $this->logger->warning('translation: missing {locale}', ['locale' => $locale]);

        return $key;
    }
@param string $locale
@param string $key
@param array  $args

@return string