src/ZaraLang.php
private function loadFile(string $file)
    {
        try {
            $this->packContent = file_get_contents($file);

            if (false === $this->packContent) {
                throw new Exception('Exception: Could not load language pack.');
            }

            $this->langContent = json_decode($this->packContent, true);
            $error_json = json_last_error();

            if (JSON_ERROR_NONE !== $error_json) {
                throw new Exception('Exception: Could not read language pack.');
            }

        } catch (Exception $e) {
            echo $e->getMessage();
            exit;
        }
    }
private function loadFile(string $file)
    {
        try {
            $this->packContent = file_get_contents($file);

            if (false === $this->packContent) {
                throw new Exception('Exception: Could not load language pack.');
            }

            $this->langContent = json_decode($this->packContent, true);
            $error_json = json_last_error();

            if (JSON_ERROR_NONE !== $error_json) {
                throw new Exception('Exception: Could not read language pack.');
            }

        } catch (Exception $e) {
            echo $e->getMessage();
            exit;
        }
    }
[pt-br] Carrega o arquivo de idioma.
[en]    Loads the language file.

@param $file