src/Viserio/Component/Translation/TranslationManager.php
public function getTranslator(string $locale = null): TranslatorContract
    {
        $lang = $locale ?? $this->locale;

        if (isset($this->translations[$lang])) {
            return $this->translations[$lang];
        }

        throw new RuntimeException(\sprintf('Translator for [%s] doesn\'t exist.', $lang));
    }
public function getTranslator(string $locale = null): TranslatorContract
    {
        $lang = $locale ?? $this->locale;

        if (isset($this->translations[$lang])) {
            return $this->translations[$lang];
        }

        throw new RuntimeException(\sprintf('Translator for [%s] doesn\'t exist.', $lang));
    }
{@inheritdoc}