public function loadTranslations($translations)
    {
        if (is_object($translations) && $translations instanceof Translations) {
            $translations = PhpArray::generate($translations, ['includeHeaders' => false]);
        } elseif (is_string($translations) && is_file($translations)) {
            $translations = include $translations;
        } elseif (!is_array($translations)) {
            throw new \InvalidArgumentException(
                'Invalid Translator: only arrays, files or instance of Translations are allowed'
            );
        }

        $this->addTranslations($translations);

        return $this;
    }
public function loadTranslations($translations)
    {
        if (is_object($translations) && $translations instanceof Translations) {
            $translations = PhpArray::generate($translations, ['includeHeaders' => false]);
        } elseif (is_string($translations) && is_file($translations)) {
            $translations = include $translations;
        } elseif (!is_array($translations)) {
            throw new \InvalidArgumentException(
                'Invalid Translator: only arrays, files or instance of Translations are allowed'
            );
        }

        $this->addTranslations($translations);

        return $this;
    }
public function loadTranslations ( $ translations ) { if ( is_object ( $ translations ) && $ translations instanceof Translations ) { $ translations = PhpArray :: generate ( $ translations , [ 'includeHeaders' => false ] ) ; } elseif ( is_string ( $ translations ) && is_file ( $ translations ) ) { $ translations = include $ translations ; } elseif ( ! is_array ( $ translations ) ) { throw new \ InvalidArgumentException ( 'Invalid Translator: only arrays, files or instance of Translations are allowed' ) ; } $ this -> addTranslations ( $ translations ) ; return $ this ; }
Loads translation from a Translations instance, a file on an array.

@param Translations|string|array $translations

@return self
Loads translation from a Translations instance a file on an array .